28123 Parallax Inc, 28123 Datasheet - Page 100

TEXT WHAT'S A MICROCONTROLLER

28123

Manufacturer Part Number
28123
Description
TEXT WHAT'S A MICROCONTROLLER
Manufacturer
Parallax Inc
Type
Programmingr
Datasheet

Specifications of 28123

Style
Book
Title
What's a Microcontroller?
Contents
Whats a Microcontroller? Text
Product
Microcontroller Accessories
Core Processor
PIC16C57c
Flash
128 Bytes
Operating Supply Voltage
9 V
Board Size
31 mm x 16 mm
Lead Free Status / RoHS Status
Not applicable / Not applicable
' 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 28123