Showing posts from December, 2013

Power Save with Atmega16A and Atmega8-PU

In my very first beginning of my electronic project and study (autodidact) was so enthusiast with my Atmega8-PU (the -PU means than could run with 16Mhz crystal). Playing with timer0/1/2 was very fun. And there was a time that i came to power-save-mode, interesting part began. In the power-save-mode there are several ways to wake up the chip (Atmega8): 1. External Interrupts (INT0/INT1) 2. TWI Address Match (I2C peripheral) 3. Timer2 (which has to be run in Async Mode) I choose to use the Timer2 to trigger the wake-up. There is a cost to play with, since i have set the fuses wrongly. The fuses were set to run in low frequency crystal, 32Khz. And right after the setting applied, the chip is no longer be able to be programmed. So how i can achieve to use the 32Khz crystal as my input in TOSC1 and TOSC2? The datasheet shows that it is possible to run the 32KHz crystal at TOSC1 and TOSC2 pins with workaround adding 2 caps of 22pF. The timer2 prescaler set to /128 so a sec