Go Down

Topic: Uno frequency (Read 1 time) previous topic - next topic

vanja

Hi,
Does the Uno frequency drop when you use the 3.3V rail instead of the 5V and can this be compensated for by introducing an increased delay in a sketch? So if the Uno is 16 Mhz at 5V then at 3.3V we have ABOUT 10MHz so should I double SAY any clock critical delays??
Best

RuggedCircuits

You have it slightly backwards. The Uno clock frequency does not change with the voltage on the supply rail; it depends only on the crystal oscillator frequency you are using.

BUT...at lower voltages, you cannot use higher frequencies (see Figure 29-1 in the ATmega328P datasheet for example). At 4.5V and higher you can run at a full 20 MHz, but at 2.7V you can only run at 10 MHz. If you try to run an ATmega328P at 16 MHz and 3.3V it probably just will not work (or not work reliably). My calculations say the maximum frequency at 3.3V is 13.3 MHz.

--
The Basic Motor Driver: simple, inexpensive motor driver for 1 stepper motor or 2 DC motors

Nick Gammon

I have a table of max frequencies vs voltage here:

http://www.gammon.com.au/forum/?id=11497

I agree with RuggedCircuits about the 13.3 MHz.

So you might use a 12 MHz crystal, and adjust the include files appropriately for the sketch so that the delays work out right. Or compensate in your own code. You would also need to compensate for Serial.begin (if you use that).
http://www.gammon.com.au/electronics

vanja

Hi,
Of course I have it backwards and you are right an oscillator is an oscillator which oscillates at a certain fundamental frequency dependant on the crystalline structure.

What I was thinking of was a 16MHz 328p mini pro (Chinese clone) I was looking at some weeks back and it was behaving erratically but seemed to work OK on a simple programme when I increased the DELAY times.
Your comments are most interesting, thank you

vanja

Many thanks for your link Nick, all very very interesting.
Best

VccDood


... If you try to run an ATmega328P at 16 MHz and 3.3V it probably just will not work (or not work reliably). My calculations say the maximum frequency at 3.3V is 13.3 MHz. 


I run an Uno/328 on 3.3V at 16MHz everyday without any troubles.  It's not the best solution, but whenever I have to interface with 3.3V sensors, I just run the entire circuit at 3.3V and it works.

Grumpy_Mike

Quote
I run an Uno/328 on 3.3V at 16MHz everyday without any troubles.

Yes but you are over clocking the device. The manufacturers do not guarantee that all the chips the make will run under such conditions, or all chips that do run will continue to do so as the components age.

Deviating from the makers specifications is like the concept of becoming an outlaw, no longer subject to an obligation to obey but also no longer subject to it's protection. 

vanja

#7
Apr 30, 2012, 12:16 pm Last Edit: Apr 30, 2012, 12:37 pm by vanja Reason: 1
I was using a 3.3V pressure sensor with the 328p mini pro and thought it was an ideal solution until I had erratic results. It is overclocking as you say, commonly used on the pc. My Chinese mini clone has a 3.3 or 5V option so I assume I should use the 5 V rail and use a LLC to step it down. This kind of begs the question as to why a LLC is not built onto a '3.3V' board in the first place or am I missing something again?

I am still not clear though what happens to the crystal / frequency as you reduce the voltage below the threshold. I would have thought that there would have been a distinct cut off voltage and it would stop oscillating but obviously not. I suppose it has something to do with the rise time to resonance.
 
NICK  Off topic. What logic analyzer do you use and perhaps recommend (cheap if possible)for this kind of work as I see many "logic" pictures on your site which help to see what is going on.

Nick Gammon

http://www.saleae.com/logic/

I'm very happy with it.
http://www.gammon.com.au/electronics

Grumpy_Mike

Quote
I am still not clear though what happens to the crystal / frequency as you reduce the voltage

Nothing happens to the frequency. What will happen is that at some pointing will stop, or fail to start when that voltage is applied, or will not be able to work at as higher temperature. Or more worryingly some of the latches gates and flip flops inside the processor might skip a clock cycle and the processor starts to screwup. You might not notice this at first because you might not be using that Instruction. But it will start to stutter.
All in all not a place you want to be.

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview