Hello..I'm fairly experienced with Arduino and AVR chips. I was trying to put my Atmega8A, programmed using the Arduino IDE. I also implemented the power down sleep mode code using avr/sleep.h. However, the power consumption didn't seem to be low as expected. Then I wrote a blank sketch in Arduino IDE as well as Atmel Studio without any kind of sleep mode and Arduino IDE sketch was consuming much more power than the one coded in Atmel Studio. Then I tried using the sleep mode. The one done in Arduino IDE was consuming around 300uA while the one done in Atmel Studio was using just 3uA. The setup involves only an Atmega8 running @ 3.3V, 1Mhz internal oscillator with nothing connected to the chip externally other than Vcc and GND. The datasheet says the @ 3v, 4Mhz, I should be getting a power consumption of around 0.5uA. 3uA is good enough but it would be great if i could achieve what the datasheet says. Maybe the Arduino IDE keeps some peripherals running. On Atmega8, it seems that the only peripheral that seems to be ON by default is the Analog Comparator. Any tips to further reduce power consumption will be helpful.
Thanks