English
Language : 

AN594 Datasheet, PDF (22/28 Pages) STMicroelectronics – This note describes a technique for driving
Direct LCD Drive
ANNEX 2: Software of the ST6265x based application (Continued)
jrr 1,LCDCTL,LOOP2
; determine phase2 operation
jrr 2,LCDCTL,LOOP3
; determine phase3 operation
;************************* PHASE 4 *********************************
LOOP4
inc DIG1
inc DIG2
call DATALCD
; increment DIG1 & DIG2 for phase 4
;
; calculate phase4 segments driver byte
ldi pbbuf,00000011b ; pb buffer load
ldi pb ,00000011b ; pb1 in High Impedance (HI) & pb0 to 0
ldi pbdir,00110001b ;
ldi pbbuf,00000010b ; pb buffer load
ldi pb ,00000010b ;
ld
pa,a
; load segment driver byte on port a
ld
a,AUX3
;|
ld
x,a
;|
ld
a,AUX2
;|return to main tasks with context ;
ld
drwr,a
;| ( AUX2 <== drwr in main program )
;
ld
a,AUX1
;|
clr LCDCTL
reti
; end of loop4 & full LCD sequence
;************************* PHASE 3 ********************************
LOOP3
inc DIG1
inc DIG2
call DATALCD
; increment DIG1 & DIG2 for phase 3
; calculate phase3 segments driver byte
ldi pbopt,00110000b ; pb0 in HI & pb1 to 0
ldi pbdir,00110010b ;
ldi pbbuf,00000001b ; pb buffer load
ldi pb, 00000001b ;
ld
pa ,a
; load segment driver byte on port a
;
ld
a,AUX3
;|
;
ld
x,a
;|
;
ld
a,AUX2
;|return to main tasks with context
;
ld
drwr,a
;| ( AUX2 <== drwr in main program )
;
ld
a,AUX1
;|
set 2,LCDCTL
reti
; end of loop3
;************************* PHASE 2 *********************************
LOOP2
inc DIG1
inc DIG2
call DATALCD
; increment DIG1 & DIG2 for phase 2
; calculate phase2 segments driver byte
ldi pbopt,00110000b ; pb1 in HI & pb0 to 1
ldi pbdir,00110001b ;
ldi pbopt,00110001b ;
ld
pa,a
; load segment driver byte on port a
;
ld
a,AUX3
;|
;
ld
x,a
;|
;
ld
a,AUX2
;|return to main tasks with context
;
ld
drwr,a
;| ( AUX2 <== drwr in main program )
;
ld
a,AUX1
;|
22/28