28122 Parallax Inc, 28122 Datasheet - Page 68

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
DO
LOOP
Controlling Both LEDs
Yes, you can flash both LEDs at once. One way you can do this is to use two
commands before the first
next
LEDs off. It’s true that both LEDs will not turn on and off at exactly the same time
because one is turned on or off after the other. However, there is no more than a
millisecond’s difference between the two changes, and the human eye will not detect it.
Example Program: FlashBothLeds.bs2
' What's a Microcontroller - FlashBothLeds.bs2
' Turn LEDs connected to P14 and P15 on and off.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
DO
LOOP
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
HIGH 14
HIGH 15
PAUSE 500
LOW 14
LOW 15
PAUSE 500
HIGH
Enter the FlashBothLeds.bs2 code into the BASIC Stamp Editor.
Run the program.
Verify that both LEDs appear to flash on and off at the same time.
command sets P15 high. You will also need two
PAUSE
command. One
HIGH
command sets P14 high, and the
LOW
commands to turn both
HIGH

Related parts for 28122