Pages: [1]   Go Down
Author Topic: Maximum frequency generated by Arduino uno  (Read 1890 times)
0 Members and 1 Guest are viewing this topic.
Venezuela
Offline Offline
God Member
*****
Karma: 16
Posts: 514
Ground, ground, always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone have idea of the maximum frequency that can be generated by Arduino uno? Thanks
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 200
Posts: 12774
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


If you replace the resonator, 20 MHz.

If you don't, 16 MHz.

In both cases, that would be accomplished by outputting the clock signal on a specific pin.
Logged

Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone have idea of the maximum frequency that can be generated by Arduino uno?

Maximum frequency of what? Sound? Clock speed? If clock speed, then it's 16MHz
Logged

Arduino Uno R3
Mac OSX Lion


Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


If you replace the resonator, 20 MHz.


What the maximum resonator you could use for a Arduino Uno R3? 20MHZ is the limit?
Logged

Arduino Uno R3
Mac OSX Lion


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 200
Posts: 12774
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


The maximum supported speed is 20 MHz. 

The processor can be overclocked.  I vaguely recall that the memory is physically limited to 32 MHz; it simply cannot fetch data any faster.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone have idea of the maximum frequency that can be generated by Arduino uno? Thanks

What do you mean by "generated"? The hardware timers can output some fraction of the clock speed.

This thread seems to ask the same question:

http://arduino.cc/forum/index.php/topic,128269
Logged

Venezuela
Offline Offline
God Member
*****
Karma: 16
Posts: 514
Ground, ground, always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am sorry that I do not expressed better my question but at the same time it is interesting to note all the approaches that have been generated.
I wanted in my question to know the highest frequency that can be generated switching one digital output as shown in the general example below:

Code:
int pin = HIGH;
....

void setup() {
Serial.begin(9600);
pinMode(5, OUTPUT);
}
....

void loop()
{
...

if (pin == HIGH)
pin = LOW;
else
pin = HIGH;

digitalWrite(5, pin);
....
}

Thank you.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try it and see. It won't be particularly high, and the signal will have artifacts due to any delays introduced by other processing, and timer interrupts.

The method of using timers will be better, in the sense that the hardware can generate a higher frequency, and it won't be affected by other processing.

Code:
int pin = HIGH;

void setup()
  {
  pinMode(5, OUTPUT);
  }

void loop()
  {

  if (pin == HIGH)
    pin = LOW;
  else
    pin = HIGH;

  digitalWrite(5, pin);
  }

I measured 90.566 KHz with the above sketch.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the best product to use if I am trying to obtain 36mhz?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What is the best product to use if I am trying to obtain 36mhz?

what is your definition of "best"?
« Last Edit: October 25, 2012, 02:15:58 pm by Coding Badly » Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the best product to use if I am trying to obtain 36mhz?

I presume you mean 36 MHz? Not 36 milliHerz?

You won't get that out of an Arduino, whose clock is only 16 MHz (20 MHz tops with a different crystal).

Perhaps it's time to explain your project. Why do you need 36 MHz? Are you making a radio station?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Code:
void loop()
{
...

if (pin == HIGH)
pin = LOW;
else
pin = HIGH;

digitalWrite(5, pin);
....
}

What is the best product to use if I am trying to obtain 36mhz?

I wouldn't be trying to switch that way. Period. Use a hardware timer. Whatever platform you get.
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 50
Posts: 2207
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is not something that you should really do with a microprocessor, its not what they are designed for!

All you need is a single chip such as this http://www.datasheetdir.com/MK3727+VCXO.

Mark
Logged

Pages: [1]   Go Up
Jump to: