28122 Parallax Inc, 28122 Datasheet - Page 192

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
END
Example Program: DialDisplay.bs2
This example program mirrors the position of the potentiometer’s knob by lighting
segments around the outside of the 7-segment LED display as shown in Figure 6-16.
' What's a Microcontroller - DialDisplay.bs2
' Display POT position using 7-segment LED display.
'{$STAMP BS2}
'{$PBASIC 2.5}
DEBUG "Program Running!"
index
time
OUTH = %00000000
DIRH = %11111111
DO
HIGH 5
PAUSE 100
RCTIME 5, 1, time
LOOKDOWN time, <= [40, 150, 275, 400, 550, 800], index
"LOOKDOWN command places in the ", CR,
"index variable."
Enter and run DialDisplay.bs2.
Twist the potentiometer’s input shaft and make sure it works.
When you run the example program, it may not be as precise as shown in
Figure 6-16. Adjust the values in the lookdown table so that that the digital
display more accurately depicts the position of the potentiometer.
VAR
VAR
Nib
Word
Figure 6-16
Displaying the
Potentiometer’s
Position with the
7-Segment LED
Display

Related parts for 28122