27220 Parallax Inc, 27220 Datasheet - Page 71

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
' -----[ Variables ]-------------------------------------------------------
idx
' -----[ EEPROM Data ]-----------------------------------------------------
'
'
Digit0
Digit1
Digit2
Digit3
Digit4
Digit5
Digit6
Digit7
Digit8
Digit9
' -----[ Initialization ]--------------------------------------------------
Reset:
' -----[ Program Code ]----------------------------------------------------
Main:
Behind the Scenes
This experiment is very similar to the light show program in basic operation: a
pattern is read from the EEPROM and transferred directly to the LED segments. In
this program, sending specific patterns to the 7-segment LED creates the digits zero
through nine.
To demonstrate that all five modules have the segment lines tied together (and
connected to terminals A through DP, respectively), move the Vss connection from
DIGIT 0 to DIGIT 4. See what happens?
SegsDirs = %01111111
FOR idx = 0 TO 9
NEXT
GOTO Main
READ (Digit0 + idx), Segs
PAUSE 1000
VAR
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
DATA
Nib
%00111111
%00000110
%01011011
%01001111
%01100110
%01101101
%01111101
%00000111
%01111111
%01100111
.GFEDCBA
--------
' counter variable
' make outputs for LEDs
' loop through digits
' move pattern to display

Related parts for 27220