Datasheet

PIC16C9XX
DS30444E - page 100 1997 Microchip Technology Inc.
13.4.1 SEGMENT ENABLES
The LCDSE register is used to select the pin function
for groups of pins. The selection allows each group of
pins to operate as either LCD drivers or digital only
pins. To configure the pins as a digital port, the corre-
sponding bits in the LCDSE register must be cleared.
If the pin is a digital I/O the corresponding TRIS bit con-
trols the data direction. Any bit set in the LCDSE regis-
ter overrides any bit settings in the corresponding TRIS
register.
Note 1: On a Power-on Reset these pins are con-
gured as LCD drivers.
Note 2: The LMUX1:LMUX0 takes precedence
over the LCDSE bit settings for pins RD7,
RD6 and RD5.
EXAMPLE 13-1: STATIC MUX WITH 32
SEGMENTS
BCF STATUS,RP0 ;Select Bank 2
BSF STATUS,RP1 ;
BCF LCDCON,LMUX1 ;Select Static MUX
BCF LCDCON,LMUX0 ;
MOVLW 0xFF ;Make PortD,E,F,G
MOVWF LCDSE ;LCD pins
. . . ;configure rest of LCD
EXAMPLE 13-2: 1/3 MUX WITH 13
SEGMENTS
BCF STATUS,RP0 ;Select Bank 2
BSF STATUS,RP1 ;
BSF LCDCON,LMUX1 ;Select 1/3 MUX
BCF LCDCON,LMUX0 ;
MOVLW 0x87 ;Make PORTD<7:0> &
MOVWF LCDSE ;PORTE<6:0> LCD pins
. . . ;configure rest of LCD
FIGURE 13-12:LCDSE REGISTER (ADDRESS 10Dh)
R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1 R/W-1
SE29 SE27 SE20 SE16 SE12 SE9 SE5 SE0 R =Readable bit
W =Writable bit
U =Unimplemented bit,
Read as ‘0’
-n =Value at POR reset
bit7 bit0
bit 7: SE29: Pin function select RD7/COM1/SEG31 - RD5/COM3/SEG29
1 = pins have LCD drive function
0 = pins have digital Input function
The LMUX1:LMUX0 setting takes precedence over the LCDSE register.
bit 6: SE27: Pin function select RG7/SEG28 and RE7/SEG27
1 = pins have LCD drive function
0 = pins have digital Input function
bit 5: SE20: Pin function select RG6/SEG26 - RG0/SEG20
1 = pins have LCD drive function
0 = pins have digital Input function
bit 4: SE16: Pin function select RF7/SEG19 - RF4/SEG16
1 = pins have LCD drive function
0 = pins have digital Input function
bit 3: SE12: Pin function select RF3/SEG15 - RF0/SEG12
1 = pins have LCD drive function
0 = pins have digital Input function
bit 2: SE9: Pin function select RE6/SEG11 - RE4/SEG09
1 = pins have LCD drive function
0 = pins have digital Input function
bit 1: SE5: Pin function select RE3/SEG08 - RE0/SEG05
1 = pins have LCD drive function
0 = pins have digital Input function
bit 0: SE0: Pin function select RD4/SEG04 - RD0/SEG00
1 = pins have LCD drive function
0 = pins have digital I/O function