Техническая Спецификация для Microchip Technology ARD00385
PIC18F87K90 FAMILY
DS39957D-page 300
2009-2011 Microchip Technology Inc.
20.11 Configuring the LCD Module
To configure the LCD module.
1.
1.
Select the frame clock prescale, using bits,
LP<3:0> (LCDPS<3:0>).
LP<3:0> (LCDPS<3:0>).
2.
Configure the appropriate pins to function as
segment drivers using the LCDSEx registers.
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
biasing, enable the internal reference ladder
and:
• Define the Mode A and Mode B interval by
using the LRLAT<2:0> bits (LCDRL<2:0>)
• Define the low, medium or high ladder for
Mode A and Mode B by using the LRLAP<1:0>
bits (LCDRL<7:6>) and the LRLBP<1:0> bits
(LCDRL<5:4>), respectively
bits (LCDRL<7:6>) and the LRLBP<1:0> bits
(LCDRL<5:4>), respectively
• Set the VLCDxPE bits and enable the
LCDIRE bit (LCDREF<7>)
4.
Configure the following LCD module functions
using the LCDCON register:
• Multiplex and Bias mode – LMUX<1:0> bits
• Timing Source – CS<1:0> bits
• Sleep mode – SLPEN bit
using the LCDCON register:
• Multiplex and Bias mode – LMUX<1:0> bits
• Timing Source – CS<1:0> bits
• Sleep mode – SLPEN bit
5.
Write initial values to the pixel data registers,
LCDDATA0 through LCDDATA23.
LCDDATA0 through LCDDATA23.
6.
Clear the LCD Interrupt Flag, LCDIF (PIR3<6>),
and if desired, enable the interrupt by setting bit,
LCDIE (PIE3<6>).
and if desired, enable the interrupt by setting bit,
LCDIE (PIE3<6>).
7.
Enable the LCD module by setting bit, LCDEN
(LCDCON<7>).
(LCDCON<7>).