Go Down

Topic: Maximum frequency generated by Arduino uno (Read 2489 times) previous topic - next topic

Palliser

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

Coding Badly


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.

mixania


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
Arduino Uno R3
Mac OSX Lion

mixania



If you replace the resonator, 20 MHz.



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

Coding Badly


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.

Nick Gammon


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
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Palliser

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: [Select]
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.

Nick Gammon

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: [Select]

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.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Jayee165

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

robtillaart

#9
Oct 25, 2012, 08:56 pm Last Edit: Oct 25, 2012, 09:15 pm by Coding Badly Reason: 1
Quote
What is the best product to use if I am trying to obtain 36mhz?


what is your definition of "best"?
Rob Tillaart

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

Nick Gammon


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?
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon

Quote
Code: [Select]
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.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

holmes4

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

Go Up