28123 Parallax Inc, 28123 Datasheet - Page 63

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 - LedOnOffTenTimes.bs2
' Turn an LED on and off.
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Byte
FOR counter = 1 TO 10
NEXT
DEBUG "All done!"
END
How LedOnOffTenTimes.bs2 Works
This PBASIC statement
tells the BASIC Stamp Editor that your program will use the word
that can store a byte’s worth of information.
DEBUG ? counter
HIGH 14
PAUSE 500
LOW 14
PAUSE 500
counter VAR Byte
Run the program a second time, and verify that the value of
the Debug Terminal accurately tracks how many times the LED blinked. Hint:
instead of clicking Run a second time, you can press and release the Reset
button on your Board of Education or HomeWork Board.
Repeat 10 times.
counter
counter
as a variable
shown in

Related parts for 28123