28122 Parallax Inc, 28122 Datasheet - Page 226

KIT WHAT'S A MICRO:PARTS ONLY

28122

Manufacturer Part Number
28122
Description
KIT WHAT'S A MICRO:PARTS ONLY
Manufacturer
Parallax Inc
Datasheet

Specifications of 28122

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
For Use With/related Products
Board of Education Full Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Further Investigation
“Applied Sensors”, Student Guide, Version 2.0, Parallax Inc., 2003
“Industrial Control”, Student Guide, Version 2.0, Parallax Inc., 2002
The key to solving this problem is to insert an
whether the photoresistor reading is above some threshold value. If it is, flash
the LED. The threshold value can be found by running TestPhotoresistor.bs2
and observing the readings. Note the difference between an unshaded and a
shaded value. Take a value somewhere in the middle and use that for your
threshold. In the solution shown, the threshold value was encoded in a constant
named
' What's a Microcontroller - Ch07Prj01_PhotoresistorFlasher.bs2
' Make LED on P14 flash whenever a shadow is cast over
' the photoresistor.
' {$STAMP BS2}
' {$PBASIC 2.5}
Dark
time
DO
LOOP
More in-depth coverage of light measurement using a photodiode, scientific
units and math are featured in this text along with other sensor applications.
Stamp Plot Lite was developed in conjunction with this text to demonstrate the
fundamentals of techniques used in industrial process control.
HIGH 2
PAUSE 100
RCTIME 2, 1, time
DEBUG HOME, "time =
IF (time > Dark) THEN
ENDIF
HIGH 14
PAUSE 100
LOW 14
PAUSE 100
Dark
CON
VAR
to make the program easier to change.
25
Word
Change "Dark" constant for your conditions.
", DEC5 time ' Print value to Debug Terminal
' Read photoresistor with RCTIME
' Compare reading to known dark value
' Blink LED on pin P14
IF…THEN
statement that tests

Related parts for 28122