27924 Parallax Inc, 27924 Datasheet - Page 3
![Microcontroller Modules & Accessories TAOS TSL230 Light to Frequency Converter](/photos/15/94/159487/27924-l_sml.jpg)
27924
Manufacturer Part Number
27924
Description
Microcontroller Modules & Accessories TAOS TSL230 Light to Frequency Converter
Manufacturer
Parallax Inc
Datasheet
1.27924.pdf
(4 pages)
Specifications of 27924
Product
Microcontroller Accessories
Flash
256 KB
Timers
5 x 8 bit
Board Size
88.9 mm x 50.8 mm x 21.84 mm
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
' TSL230R-Test.bs2
' Configures TSL230R for x10 sensitivity
' Displays output in Debug Terminal
' {$STAMP BS2}
' {$PBASIC 2.5}
'-----Define variables, set status of pins-----
x
cnt VAR
'-----Constant declarations------
S0
S1
In
'-----Program Start-----
LOW S0
HIGH S1
'-----Main program loop-----
FOR x = 1 TO 2000
NEXT
END
Propeller Example – TSL230 Simple Demo.spin
This example reads the frequency output on pin 6 and displays the number on a television, and it makes
use of the TV_Text object that is included in the home folder of the Propeller Tool software. (If you are
not using a Propeller Demo Board, see its schematic for information on connecting a TV to the Propeller
chip.) Pins 1 and 2 of the TSL230R are connected to two consecutive pins on the Propeller and set the
sensitivity of the TSL230R. For this example the pins are explicitly set to the middle range x10. These can
be set to any sensitivity required for the application.
{{********************************************************
Copyright © Parallax Inc.
COUNT In, 100, cnt
DEBUG HOME, DEC5 cnt
Taos TSL230 light to frequency sensor v1.0 simple demo
√
√
√
VAR
PIN 0
PIN 1
PIN 2
Build the circuit shown above, connecting to the BS2 I/O pins as shown.
Enter and run TSL230R-Test.bs2, listed below.
Pass a flashlight over the TSL320R; you should see the value in the Debug Terminal rise as the
TSL230R receives brighter light.
cbase+1 ──│2
Word
Word
cbase ──│1 o
┌──│3
│
┣──│4
┌──────────┐
│
│
│
└──────────┘
[]
'Sensitivity selection pins
'TSL230R output pin
'Set sensitivity pins (S0,S1) to x10
'COUNT on P2 FOR 100 ms, store value in cnt
'Display value of cnt as a decimal
TSL230R Light-to-Frequency Converter (#27924)
8│──┳──┐
7│──┘
6│──── pin
5│──┘ 3.3V
│
│
│
│
v1.0 12/14/2007 Page 3 of 4