Connect PORTC.2 of 16F877 to PWM IN. Connect Vee on LCD to Vee Out. '**************** LCD Display Negative Voltage ******************** '********************* 16F877 @ 20 MHz **************************** PR2=255 ' Set PR2 to 19.53 kHz CCPR1L=230 ' Set Pulse width - CCPR1L must be less than PR2. ' Lower number(pulse width)=higher view angle ' PR2 value is 100% duty cycle. ' PR2/2 = 50% duty cycle. TRISC.2=0 ' Set CCP1 bit as output T2CON=%00000100 ' Timer on prescale is 1 CCP1CON=%00001100 ' Set PWM Mode '******************************************************************