David Covick [dac@WEST.NET]
I designed this little circuit a few months ago using SPICE. Just vary the PWM and you are home free. You don't need any external negative voltage!! It produces negative voltage on its own using a positive voltage in a charge pumping type method off the PIC PWM.The attached virus free jpg schematic will fill you in.
Have at it! Sample ref code:
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 '******************************************************************
Questions:
See also: