28123 Parallax Inc, 28123 Datasheet - Page 193

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
LOOP
How DialDisplay.bs2 Works
This example program takes an
a variable named
The
number in the list
into the
Then, the
the
Your Turn – Adding a Segment
DialDisplay.bs2 only makes five of the six segments turn on when you turn the dial. The
sequence for turning the LEDs on in DialDisplay.bs2 is E, F, A, B, C, but not D.
LOOKUP index, [ %11100101, %11100001, %01100001,
OUTH
time
index
variable.
index
variable is then used in a
Save DialDisplay.bs2 under the name DialDisplayYourTurn.bs2.
Modify DialDisplayYourTurn.bs2 so that it causes all six outer LEDs to turn
on in sequence as the potentiometer is turned. The sequence should be: E, F,
A, B, C, and D.
HIGH 5
PAUSE 100
RCTIME 5, 1, time
LOOKDOWN time, <= [40, 150, 275, 400, 550, 800], index
LOOKUP index, [ %11100101, %11100001, %01100001,
variable.
variable is used in a
time
time
%00100001, %00000001, %00000000 ], OUTH
.
is smaller than, then loads the entry number (0 to 5 in this case)
%00100001, %00000001, %00000000 ], OUTH
RCTIME
LOOKDOWN
LOOKUP
measurement of the potentiometer and stores it in
table to choose the binary value to load into
table. The
LOOKDOWN
table decides which

Related parts for 28123