Datasheet

2012 Microchip Technology Inc. DS30575A-page 279
PIC18F97J94 FAMILY
13.14 Configuring the LCD Module
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. If using the internal reference resistors for
biasing, enable the internal reference ladder
and:
Define the Mode A and Mode B interval by
using the LRLAT<2:0> bits (LCDREFL<2:0>)
Define the low, medium or high ladder for
Mode A and Mode B by using the
LRLAP<1:0> bits (LCDREFL<7:6>) and the
LRLBP<1:0> bits (LCDREFL<5:4>),
respectively
Set the VLCDxPE bits and enable the
LCDIRE bit (LCDREFH<7>)
4. Configure the following LCD module functions
using the LCDCONL register:
Multiplex and Bias mode – LMUX<2:0> bits
Timing Source – CS<1:0> bits
Sleep mode – SLPEN bit
5. Write initial values to the Pixel Data registers,
LCDDATA0 through LCDDATA63.
6. Clear the LCD Interrupt Flag, LCDIF, and if
desired, enable the interrupt by setting bit,
LCDIE.
7. Enable the LCD module by setting the ON bit
(LCDCONL<7>)
13.15 Operation During Sleep
The LCD module can operate during Sleep. The selec-
tion is controlled by the SLPEN bit (LCDCONL<6>).
Setting the SLPEN bit allows the LCD module to go to
Sleep. Clearing the SLPEN bit allows the module to
continue to operate during Sleep.
If a SLEEP instruction is executed and SLPEN = 1, the
LCD module will cease all functions and go into a very
Low-Current Consumption mode. The module will stop
operation immediately and drive the minimum LCD volt-
age on both segment and common lines. Figure 13-23
shows this operation.
The LCD module current consumption will not
decrease in this mode, but the overall consumption of
the device will be lower due to shut down of the core
and other peripheral functions.
To ensure that no DC component is introduced on the
panel, the SLEEP instruction should be executed imme-
diately after an LCD frame boundary. The LCD interrupt
can be used to determine the frame boundary. See
Section 13.13 “LCD Interrupts” for the formulas to
calculate the delay.
If a SLEEP instruction is executed and SLPEN = 0, the
module will continue to display the current contents of
the LCDDATA registers. The LCD data cannot be
changed.