Parallax, Inc. • BS2p “Plus Pack” (#45184) • 10/2001
Page 12
DispRt CON $1C ' shift displayed chars right
DDRam CON $80 ' Display Data RAM control
CGRam CON $40 ' Custom character RAM
Line1 CON $80 ' DDRAM address of line 1
Line2 CON $C0 ' DDRAM address of line 2
CLines CON 8 ' lines per character
OdoChar CON 0 ' animated odometer character
' -----[ Variables ]------------------------------------------------------------
'
cmd VAR Byte ' commnand sent to LCD
char VAR Byte ' character sent to LCD
addr VAR Byte ' EE starting address of map
cNum VAR Nib ' c haracter number
idx VAR Nib ' loop counter
counter VAR Word
hundreds VAR Byte ' hundredths value of counter
temp VAR Word ' temp value for RJ display
width VAR Nib ' width of rt justified
pos VAR Byte ' LCD display position
digits VAR Nib ' digits to display
' -----[ EEPROM Data ]----------------------------------------------------------
'
' rolling odometer character definitions
'
Char0 DATA $0E,$11,$13,$15,$19,$11,$0E,$00,$00,$00
Char1 DATA $04,$0C,$04,$04,$04,$04,$0E,$00,$00,$00
Char2 DATA $0E,$11,$01,$02,$04,$08,$1F,$00,$00,$00
Char3 DATA $1F,$02,$04,$02,$01,$11,$0E,$00,$00,$00
Char4 DATA $02,$06,$0A,$12,$1F,$02,$02,$00,$00,$00
Char5 DATA $1F,$10,$1E,$01,$01,$11,$0E,$00,$00,$00
Char6 DATA $06,$08,$10,$1E,$11,$11,$0E,$00,$00,$00
Char7 DATA $1F,$01,$02,$04,$08,$08,$08,$00,$00,$00
Char8 DATA $0E,$11,$11,$0E,$11,$11,$0E,$00,$00,$00
Char9 DATA $0E,$11,$11,$0F,$01,$02,$0C,$00,$00,$00
' inverted character definitions (white on black)
'
Char0i DATA $11,$0E,$0C,$0A,$06,$0E,$11,$1F,$1F,$1F
Char1i DATA $1B,$13,$1B,$1B,$1B,$1B,$11,$1F,$1F,$1F
Char2i DATA $11,$0E,$1E,$1D,$1B,$17,$00,$1F,$1F,$1F
Char3i DATA $00,$1D,$1B,$1D,$1E,$0E,$11,$1F,$1F,$1F
Char4i DATA $1D,$19,$15,$0D,$00,$1D,$1D,$1F,$1F,$1F
Char5i DATA $00,$0F,$01,$1E,$1E,$0E,$11,$1F,$1F,$1F
Char6i DATA $19,$17,$0F,$01,$0E,$0E,$11,$1F,$1F,$1F
Char7i DATA $00,$1E,$1D,$1B,$17,$17,$17,$1F,$1F,$1F
Char8i DATA $11,$0E,$0E,$11,$0E,$0E,$11,$1F,$1F,$1F
Char9i DATA $11,$0E,$0E,$10,$1E,$1D,$13,$1F,$1F,$1F
MapStart CON Char0i
' -----[ Initialization ]-------------------------------------------------------
'
Initialize: