28123 Parallax Inc, 28123 Datasheet - Page 69

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
Your Turn – Alternate LEDs
You can cause the LEDs to alternate by swapping the
control one of the I/O pins. This means that while one LED is on, the other will be off.
ACTIVITY #5: USING CURRENT DIRECTION TO CONTROL A BI-COLOR
LED
The device shown in Figure 2-15 is a security monitor for electronic keys. When an
electronic key with the right code is used, the LED changes color, and a door opens. This
kind of LED is called a bi-color LED. This activity answers two questions:
1. How does the LED change color?
2. How can you run one with the BASIC Stamp?
Modify FlashBothLeds.bs2 so that the commands between the
keywords look like this:
Run the modified version of FlashBothLeds.bs2 and verify that the LEDs flash
alternately on and off.
HIGH 14
LOW 15
PAUSE 500
LOW 14
HIGH 15
PAUSE 500
HIGH
and
LOW
commands that
DO
and
LOOP

Related parts for 28123