![Sino Wealth SH69K55A Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/sino-wealth/sh69k55a/sh69k55a_manual_1283061029.webp)
SH69P55A/K55A
29
8. LCD Driver
The LCD driver contains a controller, a voltage generator, 4-8 common driver pins/pads and 16-20 segment driver pins/pads.
There are three different driving programmable modes: 1/4 duty & 1/3 bias, 1/6 duty & 1/3 bias and 1/8 duty & 1/4 bias. The
driving mode is controlled by the system register $29. When 1/4 duty and 1/3 bias mode are used, COM8-5 are used as
SEG17-20. When 1/6 duty and 1/3 bias mode are used, COM8-7 are used as SEG17-18. The controller consists of display
data RAM and a duty generator.
The LCD SEG1-20 can also be used as output port, which is selected by the bit2-0 of the system register $2E. When
SEG1-20 are selected to be output port, one should write data to bit3-0 at the same addresses ($08 - $0C, $38E - $390). The
LCD COM1-8 can also be used as I/O port (PORTD, PORTE), which is selected by bit2 of the system register $29. The LCD
COM1-6 and SEG1-8 can also be
shared to LED application. LCD RAM could be used as data memory if needed.
When the “STOP” instruction is executed, the LCD will be turned off, but the data of LCD RAM keeps the value.
When LCD off, both common and segment output low.
Before use the LCD driver, LEDEN (bit3 in $2B) must be cleared.
LCD Control Register $29
Address
Bit 3
Bit 2
Bit 1
Bit 0
R/W
Remarks
$29 LCDON
DUTY2
DUTY1
DUTY0
R/W
Bit2-0: Set duty and com register
Bit3: LCD display on control register
0 X X X
R/W LCD
OFF
1 X X X
R/W LCD
ON
X
0
X
X
R/W PORTD and PORTE as I/O ports
X
1
0
0
R/W Set 1/4 duty. PORTD3 - 0 as COM1 - 4, PORTE as I/O ports
X
1
0
1
R/W Set 1/4 duty. PORTE3 - 0 as COM5 - 8, PORTD as I/O ports
X 1 1 0
R/W
Set 1/6 duty. PORTD3 - 0 as COM1 - 4, PORTE3 - 2 as COM5 - 6
and PORTE1 - 0 as I/O ports
X
1
1
1
R/W Set 1/8 duty. PORTD3 - 0 as COM1 - 4, PORTE3 - 0 as COM5 - 8
LCD Frame Frequency Control Register $3C1
Address
Bit 3
Bit 2
Bit 1
Bit 0
R/W
Remarks
$3C1
LPS3
LPS2
LPS1
LPS0 R/W LCD frame frequency control register
Note:
1. If the $3C1
≠
0000B, the LCD Frame Frequency is controlled by $3C1.
COM
FOSC Code Option
Osc Range
LCD Frame Frequency
00 4M-8M
fosc/(20480*(LPS+1))
01 2M-4M
fosc/(10240*(LPS+1))
10 1M-2M
fosc/(5120*(LPS+1))
11 400k-1M
fosc/(2560*(LPS+1))
4
xx 32.768k
fosc/(160*(LPS+1))
00 4M-8M
fosc/(28672*(LPS+1))
01 2M-4M
fosc/(14336*(LPS+1))
10 1M-2M
fosc/(7168*(LPS+1))
11 400k-1M
fosc/(3584*(LPS+1))
6
xx 32.768k
fosc/(224*(LPS+1))
00 4M-8M
fosc/(36864*(LPS+1))
10 2M-4M
fosc/(18432*(LPS+1))
01 1M-2M
fosc/(9216*(LPS+1))
11 400k-1M
fosc/(4608*(LPS+1))
8
xx 32.768k
fosc/(288*(LPS+1))
*: LPS = LPS3 - LPS0