28122 Parallax Inc, 28122 Datasheet - Page 74

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
Example Program: TestBiColorLED.bs2
' What's a Microcontroller - TestBiColorLed.bs2
' Turn bi-color LED red, then green, then off in a loop.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
DO
LOOP
Your Turn – Lights Display
In Activity #3, a variable named
blinked. What happens if you use the value
Duration
HIGH 15
LOW 14
PAUSE 500
LOW 15
HIGH 14
PAUSE 500
LOW 15
LOW 14
PAUSE 500
The bi-color LED will also turn off if you send high signals to both P14 and P15. Why?
Because the electrical pressure is the same at P14 and P15 regardless of whether you set
both I/O pins high or low.
Reconnect power.
Enter the TestBiColorLed.bs2 code into the BASIC Stamp Editor.
Run the program.
Verify that the LED cycles through the red, green, and off states.
Rename and save TestBiColorLed.bs2 as TestBiColorLedYourTurn.bs2.
Add a counter variable declaration before the
argument?
' Red
' Green
' Off
counter
was used to control how many times the LED
counter
to control the
DO
statement:
PAUSE
command’s

Related parts for 28122