Code:
DATA $60,$90,$90,$90,$90,$90,$90,$60 '0 'digits, left justified 4 bits used in each 8 bits
DATA $20,$60,$A0,$20,$20,$20,$20,$F0 '1
DATA $60,$90,$90,$10,$60,$80,$80,$F0 '2
DATA $60,$90,$10,$60,$10,$90,$90,$60 '3
DATA $90,$90,$90,$70,$10,$10,$10,$10 '4
DATA $F0,$80,$80,$E0,$10,$90,$90,$60 '5
DATA $60,$90,$80,$E0,$90,$90,$90,$60 '6
DATA $F0,$10,$10,$20,$20,$40,$40,$40 '7
DATA $60,$90,$90,$60,$90,$90,$90,$60 '8
DATA $60,$90,$90,$70,$10,$90,$90,$60 '9
INVAR=1234
FOR I=0 TO 7 'Read digit data from apropriate positions in EEPROM into own CHAR variables
READ 6+I+8*INVAR DIG 3, CHAR1
READ 6+I+8*INVAR DIG 2, CHAR2
READ 6+I+8*INVAR DIG 1, CHAR3
READ 6+I+8*INVAR DIG 0, CHAR4
FOR Y=0 TO 7 'write CHAR DATA INTO ARRAY WITH OFFSET
SCREEN32[Y]=CHAR1.0(Y)
SCREEN32[Y+8]=CHAR2.0(Y) 'OFSETS ARE SET HERE
SCREEN32[Y+16]=CHAR3.0(Y)
SCREEN32[Y+24]=CHAR4.0(Y)
NEXT
'read array data into 8 bit variables
FOR C=0 to 7
SEGA.0(C)=SCREEN32[C]
SEGB.0(C)=SCREEN32[8+C]
SEGC.0(C)=SCREEN32[16+C]
SEGD.0(C)=SCREEN32[24+C]
NEXT
'WRITE ARRAY DATA INTO DISPLAY AND GO TO NEXT LINE
LOW LOAD
shiftout datapin,clockpin,1,[1+I, SEGA]
shiftout datapin,clockpin,1,[1+I, SEGB]
shiftout datapin,clockpin,1,[1+I, SEGC]
shiftout datapin,clockpin,1,[1+I, SEGD]
HIGH LOAD
NEXT
END
Bookmarks