27220 Parallax Inc, 27220 Datasheet - Page 72

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
Page 62 · StampWorks
Take it Further
Update the program to create a single-digit hexadecimal counter. Use the patterns
below for the HEX digits.
Write Code like a Pro
Note that the DATA table the stores the 7-segment patterns uses verbose label
names and the patterns are placed in sequential order. By storing the segment
information in EEPROM instead of constants, transferring these patterns to the
display is greatly simplified.
Had we elected to store the patterns as constant values, we’d have to use the
following bit of code to make the transfer:
LOOKUP idx, [Digit0, Digit1, Digit2, Digit3, Digit4,
Digit5, Digit6, Digit7, Digit8, Digit9], Segs
As you can see, using READ is a bit tidier. In most programs, storing table values in
DATA statements will simplify coding and save code space if the same values are to
be used in more than one place in the program.

Related parts for 27220