328P clock frequency and supply voltage

Maybe this is obvious, or implied via convention, I spent a fair amount of time in the datasheet and didn't see anything explicit.

The attached figure does refer to system clock frequency only, and not to oscillator frequency? For example, I could use a 16MHz crystal, set the system clock prescaler to divide by four, and operate safely down to 1.8V? Or use the internal 8MHz RC oscillator, divide by two, and operate safely down to 1.8V?

I believe the answer to all three questions is "yes". I vaguely recall other parts of the datasheet hint that what you want to do is within the specifications.

It looks like there are enough hints in section 8 for a "yes" answer.

For example, I could use a 16MHz crystal, set the system clock prescaler to divide by four, and operate safely down to 1.8V? Or use the internal 8MHz RC oscillator, divide by two, and operate safely down to 1.8V?

The prescaler itself is hardware based and has to deal with the input frequency with the Vcc it is given. Deviate from the clock speed Vs Vcc voltage at your own risk. :wink:

Lefty

@coding, thanks, that's what I was guessing, but was feeling more OCD than usual today.

I just saw the notes similar to this in each section describing the various oscillators, so I think that's a pretty strong "Yes". @lefty, you disagree, though?

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.

Although it is slightly out of spec one can comfortably run the atmega328p at 3.3v at 16mhz. Thus avoiding the use of troublesome level shifter ic's etc if one wants to interface the atmega with a 3.3v ic. According to that graph the recommended frequencyfor 3.3v is around 12 mhz but all chips run comfortably at the default 16mhz at 3.3v even.

Yup, I've run all three of mine at 3.3v and 16mhz, no issues yet.

@lefty, you disagree, though?

Not at all. Just as long as one is aware that they are exceeding AVR's specifications. It's not like the board is going to catch fire or anything. There are even commerical arduino clones that run @3.3v &16mhz, the Seeeduino board for one has a 5v/3.3v voltage selector switch on board running at the same 16mhz clock. What one is doing is running in a 'overclock' mode, a well known hobby in the Intel PC world.

Lefty

Because 3.3V 16MHz is off the recommended range expect it to be unreliable at high temperatures (MOS goes slower at higher temps).

The clock prescaler circuit is unlikely to be a bottleneck, the process used is plenty fast enough I think. Its the complex instruction execution where lots of stuff has to settle in one clock phase that will set the minimum clock period. Read up on modern VLSI design issues to do with clocking if you've months to spare to get a better insight - the clock period is usually many many gate delays.

Actually that reminds me, at 3.3v and 16mhz one of mine tended to crash (freeze, really) below 32*c. I haven't tried at 5v though, so it's not proven that it's a voltage issue. Just something to check.