# Atmega328 Clock Freq. via Divider vs. Power

I have a question that the power section in the Atmega328p datasheet does not seem to cover. I was planning on running my system at 1MHZ with a 2.8V VCC for a good trade off of power vs performance. As it turns out 1MHz crystals and resonators do not seem to exist, Digikey has none.

If I run a divide by 8 (set with the fuse bits) attached to an 8MHz crystal, from a power standpoint will that be the same as a 1MHz clock? Obviously there will be some small additional losses from the 8MHz in-front of the clock divider but since the CPU and assorted other clock domains are slower, I'm assuming it will have a power draw close to 1MHz.

Is this correct?

EDIT I can not use the internal oscillator as I require accurate timing across a large temperature range. Also I have reviewed the datasheet and the question is asking if I feed a 8MHz clock and scale it by 8 to 1MHz is the approximately the same power use as a raw 1MHz clock.

Essentially, yes. The clock divider (a.k.a. System Clock Prescaler) is the first device in the clock chain after the input. All other clocks are derived from the output of this prescaler which means everything with the exception of the clock input and prescaler will run at 1MHz (and so draw the same power as if driven by a 1MHz clock input).

If timing isn't critical, you can also use the internal 8MHz oscillator with 8:1 prescaler. In this way you eliminate the power consumed by an external crystal or resonator circuit, and in the external oscillator circuitry.

However if you do want accurate timing (the internal Osc. is +/-10% unless calibrated), then you should use a crystal and configure the clock source to be the "Low Power Crystal Oscillator" (as opposed to the "Full Swing" option) in the ATMega fuse settings.

1MHz crystals are not that common, but there are options such as a 1.8432MHz which is a standard 'baud rate' crystal (so named because you can accurately divide it down into standard serial baud rates, e.g. 9600). These are very common and quite cheap. This will reduce the power consumed in the oscillator circuitry and clock input. Granted that is not 1MHz, but if at start up you write to the CLKPR register you can enable a 2:1 prescaler to get 921.6kHz which is close. If you are doing anything with serial comms this is well worth looking in to.

If you want an accurate 1MHz, then 2MHz crystals are also quite common. Similarly if you are using timers and want to be able to time a millisecond accurately you can also go for 2.048MHz (again common) which gives you a power of two division down to 1kHz.

• Thanks for the input you are agreeing with my point that post per-scaler is what the power charts in the manual are referencing. I would use the internal resonator but I have some serial coms that require accurate timing over a large temperature range -10C-60C. – MadHatter Oct 23 '15 at 2:40
• @MadHatter in which case as you are using serial stuff, I would definitely suggest going with a baud rate crystal as mentioned in my edit. – Tom Carpenter Oct 23 '15 at 2:42
• That is my plan as I mentioned in the original post thanks. – MadHatter Oct 23 '15 at 2:44
• Also Valid point on the 1.8432MHz, It has been a while since I did an 8bit system, the idea of a crystal specific to serial frequency completely escaped me. – MadHatter Oct 23 '15 at 3:04

The power draw will be lower at 1Mhz than 8Mhz.

In the scenario on this page http://avrprogrammers.com/howto/atmega328-power at 8Mhz and 3.3V the power draw is 4.16mA and at 1Mhz it is only 0.92mA. This will depend on your configuration though.

The internal oscillator takes the least amount of current to run. While it is less accurate than an external crystal you can measure its speed and save the data in the EEPROM to be used as calibration data.

• I have reviewed this data in the datasheet. My question / assumption is that this is based on the post clock scalier and that a 8MHz clock scaled down-to 1Mhz is the same as a raw 1MHz clock.. – MadHatter Oct 23 '15 at 2:38