I noticed that external interrupts coded on Atmega8L do not work as expected.
I am using "attachInterrupt(0,WakeUp,CHANGE)" compiled with Arduino NG or older w/ Atmega8.
Does anyone know what could be the problem? I tried coding the interrupts using registers also. It doesn't work except for external Interrupt on "LOW" to wake from POWER_DOWN mode.
This is very urgent... some plz help shed some light on this problem...
Datasheet says GICR of atmega8 has INT0 & INT1 as 6th and 7th bits respectively... (Atmega168/328 have them in 0th and 1st position... Does it change anything???
*In all but the IDLE sleep modes only LOW can be used.
Atmel data sheet:
Low level interrupts on INT0/INT1 are detected asynchronously. This implies that these interrupts can be used for waking the part also from sleep modes other than Idle mode. The I/O clock is halted in all sleep modes except Idle mode.
@tf68 that is strange because on arduino with atmega328 CHANGE interrupt works great in POWER_DOWN mode! You can verify it right away with the same code with CHANGE interrupt!
I understand that i/o clock is halted in power down mode... But as mentioned on page 66 of atmega8L datasheet the i/o clock is only required for rising/falling interrupts... It says"if a level triggered interrupt is used to wake up from power-down mode, the changed level must be held for some time to wake up the MCU"...
May be the problem is that the watchdog oscillator is disabled in my fuse bits... ??? Let me explore this possibility... What do you think?
Note that ATmega8 and ATmega328 are different "families" of chips, not just members of the same family with different amounts of memory (like m168 vs m328) The m8 is quite a bit older, and is probably "primitive" in various ways.