28122 Parallax Inc, 28122 Datasheet - Page 188

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
DEBUG ? value, CR
DEBUG "Change the index variable to a ", CR,
END
Example Program: DisplayDigitsWithLookup.bs2
This example program shows how the
storing the bit patterns used in the
which binary value is placed into the
0 to 9 again. The difference between this program and DisplayDigits.bs2 is that this
program is much more versatile. It is much quicker and easier to adjust for different
number sequences using lookup tables.
' What's a Microcontroller - DisplayDigitsWithLookup.bs2
' Use a lookup table to store and display digits with a 7-segment LED display.
'{$STAMP BS2}
'{$PBASIC 2.5}
index
OUTH = %00000000
DIRH = %11111111
DEBUG "index
FOR index = 0 TO 9
LOOKUP index, [ %11100111, %10000100, %11010011,
"different number(between 0 and 4).", CR, CR,
"Run the modified program and ", CR,
"check to see what number the", CR,
"LOOKUP command places in the", CR,
"value variable."
"-----
Enter and run DisplayDigitsWithLookup.bs2.
Verify that it does the same thing as the previous program (with much less
work).
Take a look at the Debug Terminal while the program runs. It shows how the
value of
value from the list into
OUTH
--------", CR
VAR
index
%11010110, %10110100, %01110110,
", CR,
Nib
is used by the
OUTH
OUTH
OUTH
.
LOOKUP
variable. Again, the
LOOKUP
variable. This example program counts from
command can come in really handy for
command to load the correct binary
index
is used to choose

Related parts for 28122