My first AVR PWM experiment .....
Im experimenting with the 3 PWM timers on a mega8 , and basically it goes pretty well. :P
Analog & RC filters etc , is not my strong side.
Im trying to control the LCD contrast pin on a "Hitachi" compatible Sharp display.
And drives the contrast pin-3 on the LCD via a 1k resistor from OC1B in 8-bit pwm mode with a frequency of 227 Hz.
It basically works fine , and i have a little test where i can see that at around 72/255 dutycycle my characters dissapear.
Someone on the net suggests that : one put 4.7 uf from LCD pin-3 to ground , to smoothen the signal to be more dc like. But if i do that.
I loose the chars at around 38/255 dutycycle. And then have much less granularity to adjust within.
Do i really need a cap going from LCD pin-3 to ground :?:
Next i want to control the Backlight with PWM , and a 2N2222 , but someone said that it should be switching all the time or it would "die" the 2N2222. Well i'll come around to that , and maybe