PIC16C9XX
13.6 Configuring the LCD Module
- Timing source, bits CS1:CS0
The following is the sequence of steps to follow to con-
figure the LCD module.
1. Select the frame clock prescale using bits
LP3:LP0 (LCDPS<3:0>).
2. Configure the appropriate pins to function as
segment drivers using the LCDSE register.
3. Configure the LCD module for the following
using the LCDCON register.
- Multiplex mode and Bias, bits
LMUX1:LMUX0
- Voltage generation, bit VGEN
- Sleep mode, bit SLPEN
4. Write initial values to pixel data registers,
LCDD00 through LCDD15.
5. Clear LCD interrupt flag, LCDIF (PIR1<7>), and
if desired, enable the interrupt by setting bit
LCDIE (PIE1<7>).
6. Enable the LCD module, by setting bit LCDEN
(LCDCON<7>).
TABLE 13-4: SUMMARY OF REGISTERS ASSOCIATED WITH THE LCD MODULE
Address Name
Bit 7 Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on
Power-on
Reset
Value on
all other
Resets
0Bh, 8Bh,
10Bh, 18Bh
INTCON
0Ch
PIR1
8Ch
PIE1
GIE
LCDIF
LCDIE
PEIE
ADIF(1)
ADIE(1)
T0IE
—
—
INTE
—
—
RBIE
SSPIF
SSPIE
T0IF
INTF
RBIF 0000 000x 0000 000u
CCP1IF TMR2IF TMR1IF 00-- 0000 00-- 0000
CCP1IE TMR2IE TMR1IE 00-- 0000 00-- 0000
10h
T1CON
—
— T1CKPS1 T1CKPS0 T1OSCEN T1SYNC TMR1CS TMR1ON --00 0000 --uu uuuu
10Dh
LCDSE
SE29 SE27
SE20
SE16
SE12
SE9
SE5
SE0 1111 1111 1111 1111
10Eh
LCDPS
—
—
—
—
LP3
LP2
LP1
LP0 ---- 0000 ---- 0000
10Fh
LCDCON LCDEN SLPEN
—
VGEN
CS1
CS0 LMUX1 LMUX0 00-0 0000 00-0 0000
110h
LCDD00
SEG07 SEG06
COM0 COM0
SEG05
COM0
SEG04
COM0
SEG03
COM0
SEG02 SEG01
COM0 COM0
SEG00
COM0
xxxx xxxx uuuu uuuu
111h
LCDD01
SEG15
COM0
SEG14
COM0
SEG13
COM0
SEG12
COM0
SEG11
COM0
SEG10 SEG09
COM0 COM0
SEG08
COM0
xxxx xxxx uuuu uuuu
112h
LCDD02
SEG23
COM0
SEG22
COM0
SEG21
COM0
SEG20
COM0
SEG19
COM0
SEG18
COM0
SEG17
COM0
SEG16
COM0
xxxx xxxx uuuu uuuu
113h
LCDD03
SEG31
COM0
SEG30
COM0
SEG29
COM0
SEG28
COM0
SEG27
COM0
SEG26 SEG25
COM0 COM0
SEG24
COM0
xxxx xxxx uuuu uuuu
114h
LCDD04
SEG07
COM1
SEG06
COM1
SEG05
COM1
SEG04
COM1
SEG03
COM1
SEG02 SEG01
COM1 COM1
SEG00
COM1
xxxx xxxx uuuu uuuu
115h
LCDD05
SEG15 SEG14
COM1 COM1
SEG13
COM1
SEG12
COM1
SEG11
COM1
SEG10 SEG09
COM1 COM1
SEG08
COM1
xxxx xxxx uuuu uuuu
116h
LCDD06
SEG23 SEG22
COM1 COM1
SEG21
COM1
SEG20
COM1
SEG19
COM1
SEG18 SEG17
COM1 COM1
SEG16
COM1
xxxx xxxx uuuu uuuu
117h
LCDD07
SEG31
COM1(2)
SEG30
COM1
SEG29
COM1
SEG28
COM1
SEG27
COM1
SEG26 SEG25
COM1 COM1
SEG24
COM1
xxxx xxxx uuuu uuuu
118h
LCDD08
SEG07
COM2
SEG06
COM2
SEG05
COM2
SEG04
COM2
SEG03
COM2
SEG02 SEG01
COM2 COM2
SEG00
COM2
xxxx xxxx uuuu uuuu
119h
LCDD09
SEG15
COM2
SEG14
COM2
SEG13
COM2
SEG12
COM2
SEG11
COM2
SEG10
COM2
SEG09
COM2
SEG08
COM2
xxxx xxxx uuuu uuuu
11Ah
LCDD10
SEG23
COM2
SEG22
COM2
SEG21
COM2
SEG20
COM2
SEG19
COM2
SEG18 SEG17
COM2 COM2
SEG16
COM2
xxxx xxxx uuuu uuuu
11Bh
LCDD11
SEG31 SEG30
COM2(2) COM2(2)
SEG29
COM2
SEG28
COM2
SEG27
COM2
SEG26 SEG25
COM2 COM2
SEG24
COM2
xxxx xxxx uuuu uuuu
11Ch
LCDD12
SEG07
COM3
SEG06
COM3
SEG05
COM3
SEG04
COM3
SEG03
COM3
SEG02 SEG01
COM3 COM3
SEG00
COM3
xxxx xxxx uuuu uuuu
11Dh
LCDD13
SEG15
COM3
SEG14
COM3
SEG13
COM3
SEG12
COM3
SEG11
COM3
SEG10
COM3
SEG09
COM3
SEG08
COM3
xxxx xxxx uuuu uuuu
11Eh
LCDD14
SEG23
COM3
SEG22
COM3
SEG21
COM3
SEG20
COM3
SEG19
COM3
SEG18 SEG17
COM3 COM3
SEG16
COM3
xxxx xxxx uuuu uuuu
11Fh
LCDD15
SEG31 SEG30
COM3(2) COM3(2)
SEG29
COM3(2)
SEG28
COM3
SEG27
COM3
SEG26 SEG25
COM3 COM3
SEG24
COM3
xxxx xxxx
Legend: x = unknown, u = unchanged, - = unimplemented read as '0'. Shaded cells are not used by the LCD Module.
Note 1: These bits are reserved on the PIC16C923, always maintain these bits clear.
2: These pixels do not display, but can be used as general purpose RAM.
uuuu uuuu
DS30444E - page 102
© 1997 Microchip Technology Inc.