Code:
'font data, left side start, going down, then right side going down
data %00000,%00000,%00000,%00000,%00000,%00000,%00000,%00000,%00000 '0 1
data %00110,%01110,%11110,%11110,%00110,%00110,%00110,%00110 '1 9
data %00110,%00110,%00110,%11111,%11111,%00000,%00000,%00000 '2 17
data %01111,%11111,%11000,%00000,%00000,%00000,%01111,%11111 '3 25
data %11000,%11000,%11000,%11111,%11111,%00000,%00000,%00000 '4 33
data %11110,%11111,%00011,%00011,%00011,%00011,%11111,%11110 '5 41
data %00000,%00000,%00000,%11111,%11111,%00000,%00000,%00000 '6 49
data %01111,%11111,%11000,%00000,%00000,%00000,%00000,%00000 '7 58
data %00000,%00000,%11000,%11111,%01111,%00000,%00000,%00000 '8 66
data %00011,%00011,%00011,%11111,%11110,%00000,%00000,%00000 '9 74
data %11000,%11000,%11000,%11000,%11000,%11000,%11111,%01111 '10 82
data %00011,%00011,%00011,%00011,%00011,%00011,%11111,%11111 '11 90
data %00011,%00011,%00011,%00011,%00011,%00000,%00000,%00000 '12 98
data %11111,%11111,%11000,%11000,%11000,%11000,%11111,%11111 '13 106
data %11111,%11111,%00000,%00000,%00000,%00000,%11110,%11111 '14 114
data %01111,%11111,%11000,%11000,%11000,%11000,%11111,%11111 '15 122
data %11000,%11000,%11000,%11111,%01111,%00000,%00000,%00000 '16 130
data %11110,%11111,%00011,%00000,%00000,%00000,%11110,%11111 '17 138
data %11111,%11111,%11000,%00000,%00000,%00000,%00000,%00000 '18 146
data %11111,%11111,%00011,%00011,%00111,%01110,%11100,%11000 '19 154
data %11000,%11000,%11000,%11000,%11000,%00000,%00000,%00000 '20 162
data %01111,%11111,%11000,%11000,%11000,%11000,%11111,%01111 '21 170
data %11110,%11111,%00011,%00011,%00011,%00011,%11111,%11111 '22 178
data %01111,%11111,%11000,%11000,%11000,%11000,%11000,%11000 '23 186
data %11110,%11111,%00011,%00011,%00011,%00011,%00011,%00011 '24 194
x var word ' counter variable
D VAR WORD 'VARIABLE TO BE DECODED
y var byte 'eeprom reader var
LFT VAR BYTE
LB VAR BYTE
RT VAR BYTE
RB VAR BYTE 'LEFT TOP, LEFT BOTTOM, RIGHT TOP, RIGHT BOTTOM variables
T1 VAR BYTE
T2 VAR BYTE
T3 VAR BYTE
T4 VAR BYTE 'TEMP VARIABLES FOR DATA READ
CLEANER: 'CLEAR ALL CHARS
FOR X=0 TO 7
LCDOUT $FE,64+X,0
LCDOUT $FE,72+X,0
LCDOUT $FE,80+X,0
LCDOUT $FE,88+X,0
NEXT
MAINER:
lcdout $fe,$80,0,2,0,2,".",0,2,0,2,".",0,2,0,2
lcdout $fe,$c0,1,3,1,3," ",1,3,1,3," ",1,3,1,3
'd=0
for d=0 to 9
GOSUB DECODER
GOSUB EREADER
PAUSE 1000
FOR X=0 TO 7 'Clean screen between chars
LCDOUT $FE,64+X,0
LCDOUT $FE,72+X,0
LCDOUT $FE,80+X,0
LCDOUT $FE,88+X,0
NEXT
next
GOTO MAINER
DECODER 'DECODE THE VARIABLE
IF D=0 THEN LFT=185:LB=129:RT=193:RB=73 '0
IF D=1 THEN LFT=1:LB=1:RT=9:RB=17 '1
IF D=2 THEN LFT=25:LB=33:RT=41:RB=49 '2
IF D=3 THEN LFT=57:LB=65:RT=41:RB=73 '3
IF D=4 THEN LFT=81:LB=1:RT=89:RB=97 '4
IF D=5 THEN LFT=105:LB=65:RT=113:RB=73 '5
IF D=6 THEN LFT=121:LB=129:RT=137:RB=73 '6
IF D=7 THEN LFT=145:LB=1:RT=153:RB=161 '7
IF D=8 THEN LFT=169:LB=129:RT=41:RB=73 '8
IF D=9 THEN LFT=169:LB=65:RT=177:RB=73 '9
RETURN
EREADER: 'read eeprom data into screen user area with reversal of direction for lower line, for cooler look
for x=0 to 7
READ LFT+7-X,T1
READ LB+X,T2
READ RT+X,T3
READ RB+7-X,T4
LCDOUT $FE,64+7-X,T1
LCDOUT $FE,72+X,T2
LCDOUT $FE,80+X,T3
LCDOUT $FE,88+7-X,T4
pause 25
NEXT
RETURN
Pin configs, defines and other, personalized settings not included in the above code.
Bookmarks