GBAmp3 Mod PCB Order Now
also available at retromodding.comand Deadpan Robot

Saturday, December 4, 2010

Litmer: lights pwm and time compare

Finished yesterday with software PWM driver to slowly turn lights on and off. Time compare changed in watchdog inteerupt. Now if current time is betweend on and off then on state forced. It's usfull for example if I have to reset avr or after powerdown or after burning time correction into eeprom etc. PWM is working on Timer0 interrupt.
Can not test this code in emulator because it have many bugs with timers and watchdog. But my test led works fine. So I hope it'll work with transistor and power mosfet.

No comments:

Post a Comment