Atmega328 at 4 MHz ?

Hello all.
Is it possible to run a Atmega328 at 4 MHz or even lower to save battery power?
Would the arduino code work like on a 16 MHz Atmega328 ?

MrMcChicken:
Hello all.
Is it possible to run a Atmega328 at 4 MHz or even lower to save battery power?

Yes, absolutely. I've used 1MHz and I believe the internal 128kHz oscillator can also be used as a system clock, but I've read that is probably beyond the point of diminishing returns. Additional entries in the boards.txt file will be needed for alternate clock frequencies. I don't try to use a bootloader below 8MHz, and if using the internal 8MHz oscillator (either direct or divided), it may not be accurate enough for serial comm without some tuning.

Would the arduino code work like on a 16 MHz Atmega328 ?

Yes.

Thanks a lot! :slight_smile:

can you share the board.tx file used? great to have a 4mhz working arduino, but even better if you still can program it with arduino IDE!