Download Print this page

Parallax TCS3200-DB Product Overview page 4

Color sensor module

Advertisement

The TCS3200 has an array of photodetectors, each with either a red, green, or blue filter, or no filter
(clear). The filters of each color are distributed evenly throughout the array to eliminate location bias
among the colors. Internal to the device is an oscillator which produces a square-wave output whose
frequency is proportional to the intensity of the chosen color. There is one output from this oscillator, and
the color to be read is selected using two address lines: S2 and S3. In addition, it is possible to program
the divide rate of the oscillator using two additional lines, S0 and S1. The settings for these control lines
and their functions are summarized below:
S0
0
0
1
1
The TCS3200 chip's data and control lines are brought directly to the 2mm header, through which it
interfaces to the motherboard or to another system. The only exception is the /OE output enable line,
which is permanently asserted low. In addition, both S0 and S1 are pulled high through resistors to Vdd,
which programs the TCS3200 for its maximum output frequency. Therefore, to use this setting, neither
S0 nor S1 need to be connected. There are also jumper pads on the TCS3200-DB by which either S0 or
S1, or both, can be strapped low.
To program the data rate from a BASIC Stamp, it will be necessary to connect S0 and S1 to a
programmable port. On the MoBoStamp-pe, this must be done through the AVR coprocessor via the
OWOUT instruction, since these signals do not connect directly to the BASIC Stamp chip. To set S0 and
S1 to the values (0 or 1) contained in variables of the same name, use the following PBASIC code:
OWOUT OWIO, 0, [$04 + S0, $14 + S1]
where the value for OWIO is given in the table below.
The following table maps the TCS3200-DB signals to ports on both the MoBoStamp-pe and MoBoProp
boards for sockets A and B, the Propeller Backpack, as well as the DB-Expander board:
Signal
S0
S1
S2
S3
OUT
LED
OWIO
When operating the TCS3200-DB using the SIP adapter (DB-Expander) instead of a Parallax
motherboard, the correspondence between the signals and SIP pin markings will be that of the last
column in the table above. When operated in this fashion, the +5V pin supplies power to the LEDs and
must be at least 4.5V for good current regulation and never more than 7.5V. The Vdd pin supplies the
rest of the board and can range anywhere from 2.7V to 5.5V. In any event, the LED enable input must
be at least 2.0V to turn the LEDs on. Other signal level requirements can be obtained from the TCS3200
datasheet.
© Parallax, Inc.
S1
Divide
0
Pwr. Down
1
1:50
0
1:5
1
1:1
MoBoStamp-pe
A
B
See code above.
See code above.
P9
P1
P8
P0
P11
P7
P12
P5
P10
P6
TCS3200-DB (January 21, 2010)
S2
S3
0
0
0
1
1
0
1
1
MoBoProp B
MoBoProp A
or Backpack
A9
A8
A12
A13
A10
A11
—Not Applicable—
Color
Red
Blue
Clear
Green
DB-
Expander
A1
B
A0
A
A4
E
A5
F
A2
C
A3
D
Page 4 of 7

Advertisement

loading