English
Language : 

PIC18F87J90 Datasheet, PDF (208/450 Pages) Microchip Technology – 64/80-Pin, High-Performance Microcontrollers with LCD Driver and nanoWatt Technology
PIC18F87J90 FAMILY
17.11 Configuring the LCD Module
The following is the sequence of steps to configure the
LCD module.
1. Select the frame clock prescale using bits,
LP<3:0> (LCDPS<3:0>).
2. Configure the appropriate pins to function as
segment drivers using the LCDSEx registers.
3. Configure the appropriate pins as inputs using
the TRISx registers.
4. Configure the LCD module for the following
using the LCDCON register:
• Multiplex and Bias mode (LMUX<1:0>)
• Timing source (CS<1:0>)
• Sleep mode (SLPEN)
5. Write initial values to pixel data registers,
LCDDATA0 through LCDDATA23.
6. Configure the LCD regulator:
a) If M2 or M3 bias configuration is to be used,
turn off the regulator by setting
CKSEL<1:0> (LCDREG<1:0>) to ‘00’. Set
or clear the CPEN bit (LCDREG<6>) to
select Mode 2 or Mode 3, as appropriate.
b) If M0 or M1 bias generation is to be used:
• Set the VBIAS level using the BIAS<2:0>
bits (LCDREG<5:3>).
• Set or clear the CPEN bit to enable or
disable the charge pump.
• Set or clear the MODE13 bit
(LCDREG<2>) to select the Bias mode.
• Select a regulator clock source using the
CKSEL<1:0> bits.
7. Clear LCD Interrupt Flag, LCDIF (PIR3<6>),
and if desired, enable the interrupt by setting the
LCDIE bit (PIE3<6>).
8. Enable the LCD module by setting the LCDEN
bit (LCDCON<7>).
DS39933D-page 208
 2010 Microchip Technology Inc.