GMS81C5108
19.4 Control Method of LCD Driver
Initial Setting
Flow chart of initial setting is shown in Figure 19-6.
Example: Driving of LCD
Select Frame Frequency
LDM
:
LDM
SETG
LCR,#12H
RPR,#1
;fF=64Hz, 1/4 duty(fSUB= 32.768kHz)
;Select LCD Memory(1 page)
LDX
#0
#0
Clear
C_LCD1: LDA
;RAM Clear
LCD Display
Memory
;(0100H->0124H)
STA
CMPX
BNE
CLRG
:
SET1
:
{X}+
#025H
C_LCD1
Turn on LCD
LCR.5
;Enable display
.
COM0
COM1
Setting of LCD drive method
COM2
SEG0
SEG1
COM3
Initialize of display memory
Enable display
Example: display “2”
bit 7
6
*
5
*
4
*
3
2
1
0
100
101
0
0
1
1
H
*
1
1
1
0
H
*
*
*
*
Note: * are don’t care.
Figure 19-6 Initial Setting of LCD Driver
Figure 19-7 Example of Connection COM & SEG
Display Data
Normally, display data are kept permanently in the pro-
gram memory and then stored at the display data area by
the table look-up instruction. This can be explained using
character display with 1/4 duty LCD as an example as well
as any LCD panel. The COM and SEG connections to the
LCD and display data are the same as those shown is Fig-
ure 19-7. Following is showing the Programming example
for displaying character.
Note: When power on RESET, sub oscillation start up time
is required. Enable LCD display after sub oscillation is sta-
bilized, or LCD may occur flicker at power on time shortly.
74
JUNE 2001 Ver 1.0