28122 Parallax Inc, 28122 Datasheet - Page 100

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
' What's a Microcontroller - ReactionTimer.bs2
' Test reaction time with a pushbutton and a bi-color LED.
' {$STAMP BS2}
' {$PBASIC 2.5}
timeCounter
DEBUG "Press and hold pushbutton.", CR,
DO
DO
LOOP UNTIL IN3 = 1
LOW 14
HIGH 15
PAUSE 1000
HIGH 14
LOW 15
timeCounter = 0
"to make light turn red.", CR, CR,
"When light turns green, let", CR,
"go as fast as you can.", CR, CR
VAR
Word
' Declare variable to store time.
' Display reaction instructions.
' Begin main loop.
' Nested loop repeats...
' until pushbutton press.
' Bi-color LED red.
' Delay 1 second.
' Bi-color LED green.
' Set timeCounter to zero.
Figure 3-15
Debug Terminal
Reaction Timer Game
Instructions

Related parts for 28122