ImageCraft ICC    

 Button controlled PWM with LCD display
In this example we have connected the LCD display to PORTB using PINS 0 to 5, and PINS 6 and 7 to two switches. The switch should be connected from the PIN to GND. Important: Connect the LCD R/W to GND.

PWM output is generated with Timer1 and outputs is on PORTD.5. This can be directly connected through a 100 Ohm resitor to an FET driving a lamp, motor, fan etc.

The two buttons control the duty cycle from 0 to 100%.

This was tested on a ATmega16, but all AVR with an Timer1 (PWM) should be able to do the work... Code will use about 3.2k so no AT90S2313 :-\

And the code can freely be downloaded. No copyrights !

Click here to download the latest version (7 kb)
direct lender payday loans