Venezuela
Offline
Full Member
Karma: 8
Posts: 229
Ground.......ground........always ground
|
 |
« on: October 24, 2012, 04:55:59 pm » |
Does anyone have idea of the maximum frequency that can be generated by Arduino uno? Thanks
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #1 on: October 24, 2012, 05:27:30 pm » |
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
Full Member
Karma: 2
Posts: 128
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
|
 |
« Reply #2 on: October 24, 2012, 05:27:41 pm » |
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
Full Member
Karma: 2
Posts: 128
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
|
 |
« Reply #3 on: October 24, 2012, 05:28:50 pm » |
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
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #4 on: October 24, 2012, 05:34:41 pm » |
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
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #5 on: October 24, 2012, 05:58:52 pm » |
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
Full Member
Karma: 8
Posts: 229
Ground.......ground........always ground
|
 |
« Reply #6 on: October 24, 2012, 10:36:38 pm » |
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: 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
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #7 on: October 24, 2012, 10:55:27 pm » |
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. 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
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #8 on: October 25, 2012, 07:42:08 am » |
What is the best product to use if I am trying to obtain 36mhz?
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Online
Tesla Member
Karma: 87
Posts: 9392
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #9 on: October 25, 2012, 01:56:48 pm » |
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
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #10 on: October 25, 2012, 03:09:58 pm » |
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
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #11 on: October 25, 2012, 03:22:01 pm » |
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
God Member
Karma: 8
Posts: 669
|
 |
« Reply #12 on: October 25, 2012, 03:24:59 pm » |
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
|
|
|
|
|
|