Arduino Uno, lower clock to 8MHz [internal]

Hi there,

I’ve been digging through forums but was not able to find a solution.

Final result: low power ATmega328 sensor node powered by 2xAA batteries.

Current goal: take out original ATmega328 chip from Arduino Uno v3 board [externally clocked @ 16MHz] and switch it to another ATmega328 clocked internally @ 8MHz and have it working as a slowed down original.

So far I’ve managed to build a circuit and flash original Arduino Uno bootloader to a fresh chip. Switching newly flashed chip for the original one worked great [ was able to flash program and run it, @ 16MHz of course].

Unfortunately all my attempts at switching ATmega to 8MHz yield no results. 1.6.5 IDE gives endless timeouts while 1.0.1 gives avrdude: stk500_getsync(): not in sync: resp=0x00 error.

I have tried the following setups, X = 57600, 38400, 9600

  1. Copy of original settings of Arduino Uno, fuses changed to use internal 8MHz oscillator and lower dropout voltage Uno [ 8MHz / low power ]


guide: Low-Power Wireless Sensor Node | maniacbug
bootloader file: arduino-core-files/ATmegaBOOT_168_atmega328_pro_8MHz.hex at master · codebendercc/arduino-core-files · GitHub Ultru Low-Power (<2.4V, 8 MHz) w/ ATmega328



What else can I do to have the chip running @ 8MHz on the Uno board ? Any help appreciated.



Can you straighten a few things out? Are you trying to run the atmega @8MHz on the Uno board, or on something else, e.g. breadboard?

If on the Uno board, are you trying to power that with the 2AA batteries, or with USB power?

If on a breadboard, what are you using as the usb-serial adaptor? The Uno with its socket empty?


I shouldn't have mentioned running it on batteries. That is a future goal and introduced confusion.

For now, goal: Arduino Uno board + ATmega328@8MHz, internal oscillator, powered via USB - no breadboard.

I am using a breadboard to program bootloader, using "Arduino as ISP" programmer. Then I remove the original chip from Arduino board, disconnect the breadboard and put newly flashed chip on the Uno board.

If you're using the same bootloader hex used for the Uno (looks like you are), you need to set upload.speed to half of what it is for the Uno, ie


I suspect there are also wiring issues, though, since it's getting resp:00, not something else. Check that TX/RX are the right way around, and that the chip's fuses are set correctly (ie, not set to use external crystal)

Changed fuses to use internal oscillator, changed upload speed to 57600, 38400, 9600 still no difference.
Have no extra wiring, after flashing bootloader I disconnect everything from Uno board, remove chip from Uno, put newly flashed chip on Uno [ that works for original bootloader, so programmer is ok ].

What if you leave the 8MHz chip on the breadboard, remove the chip from the Uno and connect only ground, 5V, rx & tx from the uno to the breadboard?. Don't forget 10K pull-up on the reset pin and a 0.1uF bypass cap on the breadboard.

Ultimately, you don't want to use the UNO board for battery power. Its leds, regulator and serial chips will only waste battery power. Running at 4MHz or 1MHz will give longer life still, but you must either compile a 4MHz or 1MHz hex file version of the bootloader, or abandon serial programming and always use isp programming.

Sure, don't want to use batteries to power Arduino Uno board.

What i wanted to do is to make low power sensor node based on underclocked ATmega328. So make ATmega328 use its internal 8MHz oscillator [or additionally /8 divider to achieve 1MHz], be able to program it on Arduino Uno board and be able to monitor serial data using IDE [ so i could do some debugging printfs and see results ].

Then remove chip from Arduino Uno and move to breadboard. Use AA batteries to power it and pray for it to work.


Unfortunately ran out of capacitors. Will get some more tomorrow as well as an external oscillator in case there's something seriously wrong with the internal one. Well, time to clean this mess up for today, hate seeing wires laying around in the morning.

Or better yet use the 16MHz crystal and just divide it by 2 with software settings. Using a crystal works better for serial. Modify Optiboot by adding a couple of lines of code to divide the clock in half at the beginning of the code, right before the Adaboot no-wait mod.

  CLKPR = (1 << CLKPCE);
  CLKPR = 0x01;

Then compile Optiboot with the options: BAUD_RATE=58823 AVR_FREQ=8000000L
You can then create a custom boards.txt entry with upload.speed=57600 and build.f_cpu=8000000L

The reason for compiling with that weird baud is explained here:

My custom boards.txt entry for Uno operating at 8MHz using the 16MHz crystal: Arduino Optiboot 16MHz divided by 2 for 8MHz
unob.bootloader.file=optiboot_atmega328_58823_CLKPR1-16-to-8MHz.hex (1022 Bytes)

Well, I shouldn't have said "better yet." It is only better in the sense that you can do development on your Uno without hardware-modifying it. The final configuration on the breadboard can use an 8MHz crystal.

Thanks for input guys.

Tried to connect Rx,Tx,RESET + 5V Vcc but still not able to program the chip [no sync error, internal oscillator].

I've tried dmjlambert's suggestion (more convenient, uC on the Uno board) to divide clock frequency using software approach [ compiled bootloader myself yay :wink: ] - works like a charm.

For "production" board i think i'll just use external oscillator anyways, safer.

But that's another step. I'll report progress or lack thereof.


Wire up the chip like here

and bootload it to use internal 8 MHz oscillator.

Lil update: Used external oscillator. Now I am able to program the chip on breadboard using Uno Board [Rx,Tx,RESET, 10k pull up and 0,1uF cap].

Added NRF24L01+ module, connected 2xAA batteries, so far so good.