# "Divide Clock by 8" fuse in order to use 16MHz RC oscillator for low voltage?

The Arduino (Mini) Board (ATmega328P) runs with 5V at 16 MHz with a RC oscillator. If I want to run it at a lower Vcc (eg 3V), the 16 MHz are out of spec. I know the formula in the datasheet, however, I am uncertain whether the mentioned clock rate corresponds to the frequency before or after the clock divider.

So I am wondering if the fusebit "Divide Clock by 8" would solve this problem. So externaly the µC would still see 16 MHz but internally the frequency would be 2MHz. Is this inside the specification again at ~3V?

The datasheet says that 3V is enough for about 10MHz so it should be in spec if you do that.

OTOH functions like millis() will stop working correctly. You might need to edit boards.txt to fix that.

I know what the datasheet says about clock rates and voltages.

What I am uncertain about is whether the clock rate is the "input clock rate" or the "downscaled clock rate" if the fuse bit "Divide Clock by 8" is turned on.

I've wondered the same thing. So the question really is whether the oscillator is within spec e.g. at 16MHz and 3V, even though the CPU is within spec with the CKDIV8 fuse bit programmed.

PS: I think the answer is YES based on Note 3 on p29 of the datasheet:

1. If the crystal frequency exceeds the specification of the device (depends on VCC), the CKDIV8 Fuse can be programmed in order to divide the internal frequency by 8. It must be ensured that the resulting divided clock meets the frequency specification of the device.

That note is for the low-power XO and there are similar notes for the full-swing XO and for the internal RC osc.

I think the fuse bit only applies to the internal 8MHz clock.

There's another prescaler that you can write to in software:

``````"8.12.2 CLKPR – Clock Prescale Register

Bits 3..0 – CLKPS3..0: Clock Prescaler Select Bits 3 - 0
These bits define the division factor between the selected clock source and the internal system clock.
These bits can be written run-time to vary the clock frequency to suit the application requirements.
As the divider divides the master clock input to the MCU, the speed of all synchronous peripherals is
reduced when a division factor is used.
``````

fungus: I think the fuse bit only applies to the internal 8MHz clock.

Not so, see Reply #3 above. The CKDIV8 fuse bit just determines the initial value of CLKPR. If CKDIV8 is set, then CLKPR is set to divide by eight, else, it's set to divide by one.

The Arduino (Mini) Board (ATmega328P) runs with 5V at 16 MHz with a RC oscillator.

Incorrect. A resonator is used, which is not the same at as an RC oscillator.

Do you have a programmer? It's simple enough to change the fuses in boards.txt to enable the divide by 8 circuit to run at 2 MHz and see how things look. Change the speed there to 2000000UL as well.

Copy this section, rename pro328 to something else - pro3282MHz ? and change the indicated lines:

``````##############################################################

pro3282MHz.name=Arduino Pro Mini (3.3V, 2 MHz) w/ ATmega328P  <<< all lines

pro328.bootloader.low_fuses=0xFF <<< 0x7F - bit 7 enables devide clock by 8

pro328.build.mcu=atmega328p
pro328.build.f_cpu=8000000L <<< 2000000L
pro328.build.core=arduino
pro328.build.variant=standard

##############################################################
``````

Which means that @halfdome could change the divisor to two in setup resulting in the processor running at 8 MHz. The processor would always be within specifications for 3 volts but the final speed would be more reasonable.

[quote author=Coding Badly link=topic=261643.msg1847131#msg1847131 date=1408395317] [quote author=Jack Christensen link=topic=261643.msg1846737#msg1846737 date=1408375612]The CKDIV8 fuse bit just determines the initial value of CLKPR.[/quote]

Which means that @halfdome could change the divisor to two in setup resulting in the processor running at 8 MHz. The processor would always be within specifications for 3 volts but the final speed would be more reasonable. [/quote]

Well, the processor would be within spec except for the code executed before setting CLKPR ;)

I agree. After rereading it my post is confusing. I meant have the CKDIV8 fuse bit set and adjust the divisor in setup. Initialization would be at 2 MHz. Everything else would be at 8 MHz.

What can I say, I can’t help picking nits. Although a person might get away with it the other way around, I can’t recommend it.