We’re all familiar with overclocking desktop computers; a wonderful introduction to thermal design power and the necessities of a good CPU cooler. [Marcelo] wanted to see how far he could overclock a microcontroller – in this case an ATMega328 – and ended up with a microcontroller designed for 20 MHz running at 30 MHz.
To verify that his uC could run at higher clock speeds, [Marcelo] began his experiments by uploading a piece of code that toggled a few pins as fast as possible. He needed to upload this code with a common 16 MHz crystal – AVRDude simply won’t work when a chip is clocked at higher speeds.
After successfully demonstrating his microcontroller will turn pins on and off at 30 MHz, [Marcelo] wanted to see if he could do something useful. By editing a single setting in his Arduino boards.txt file., [Marcelo] was able to have his overclocked microcontroller read and reply to characters sent over a serial connection. It worked, demonstrating an overclocked microcontroller could be useful in some situations.
As for what [Marcelo] plans to do with his faster microcontroller, he’s thinking of improving a ATMega-powered VGA color generator. A higher clock speed means he can push more pixels out to a VGA monitor.
This is pretty LOLworthy. Iv seen 72MHz STM32 chips clocked up to 160MHz
Best I have done is up a 486dx to 999Mhz. I was too afraid to let it run for more than 30 seconds or so. The CPU itself didn’t fail but lit some other stuff on fire and I burned myself for good measure.
I once overclocked a Z80 to 600 GHz.
I smell sarcasm. Clearly you are not old enough to remember hardware overclockers that overrode the ‘turbo’ feature, most of which would let you set whatever frequency you wanted up to three digits. Stuff got lit and I had to pull my coveted overclocker off in a hurry, thus the burns.
Technically you could attach an oscillator up to a z80 to supply 600Ghz, that does not mean it will work, just like the 486 – but ~1.5 Thz oscillators are easier to source.
You mean puting your finger between contacts of rezistor on cheap clock replacement? I build small 8bit pc with z80. How i like smell of burned 8kb eeprom at the morning.
Yeah, I made an 8-bit computer with an Atmega1284 and overclocked it to 900GHz, maxed out Crysis 3 on it while running Overwatch and also hacking Pentagon all at the same time.
isnt the ram and rom the part of the uC that doesnt allow higher clock rates than specified? i tried overclocking an atmega328 and over about 24mhz the sram cant be read back reliably.
I’ve tried a ATmega328P-pu at over 30 MHz with no issues but I was running it at the full 5 Volts.
It can be handy in some situations (mostly timing related) but there is a reason why chips were rated at a certain speed. I’ve seen AVR do all sorts of crazy stuff when overclocked. They may still togle pins, but some hardware will not work properly, like the uart missing bytes. Also higher voltages allow stable operation at higher speeds.
It’s cool for hacking purposes, but I certainly wouldn’t overclock a micro in a real product.
It’s fairly well understood that the core of an AVR can be overclocked without much problem. There’s a youtube video of someone pushing one to 51mhz. Where things fail is in the ADC and EEPROM. Those components (especially the ADC) don’t like anything over 16mhz. You might be lucky to push 17 or 18mhz. A vga video generator will overclock ok, but if you have to read anything analog or persist data then you’re back to 16mhz.
http://www.youtube.com/watch?v=gje4SvGOFuQ
+1
That can’t be right. ATMega chips are specced in the datasheet to run at up to 20mhz, if you’re powering them with 5V.
Spec sheets are just that: specs. The mfgrs do run tests such as OP to find a max, then a hair under, where everything works to put on the spec sheet. But you can get away with more just don’t expect things to go 100%. If you live life by what you are told, not by what you find, you will not get far.
I think that he was referring to the ADC not working beyond 16MHz at the MCU. If you set the prescaler correctly it should work up to 20MHz, and by setting the prescaler higher it should give you an usable frequency for the ADC with decent precision even if the MCU is running beyond 20MHz.
Interesting, when it’s rated at 20MHz, you wouldn’t have to feel lucky to “push” it to 18MHz… No?
Indeed some 8-bit megaAVR’s are binned 20mhz speed grade (as opposed to the cheap 16mhz garden variety).. But the same limitations apply. Replace “17 to 18mhz” with “21 to 22mhz” here.. :-) .
or you could use an external ADC and EEPROM.
i have been doing this for years (ok just 2) on by flashy business card with a cheap MC … it was not to bad when i did it on that as i programmed it in ASM but when im doing it in c or anything of that sort i have to do all the calculations ahead of time so i know what delays, bauds, exc to use
or use a crystal that divides evenly
but i tend to take the complicated root XP -blame it on my add-
Most microcontrollers can be overclocked, but there’s a reason they’re only rated for a particular clock frequency range. How the chip behaves when exceeding its specifications is anyone’s guess, and can vary depending on operating conditions, production batch and phase of the moon.
You forgot Solar Storm, and Magical dwarf !
Has anybody overclocked MSP430F5/6x 20MHZ models up to higher frequencies ?
I assure you, if the chip exists, someone has overclocked it :) But just try it yourself and see what you find. Odds are most of it will work, but some peripherals will stop functioning sensibly sooner than others.
I very much wonder how well a SAM7S series chip could do, given that nice PLL inside
Yeah, I did overclocking of an ATMega168 http://cnlohr.net/random/Circuits/AVROverclock/graph.svg and it did exceptionally well. I only tested the UART, multiplier and that the core was up and running… but they don’t seem to miss a beat. I actually used one clocked at 40 MHz for a project a while back, no problems.
As pointed out above, the usual warning that goes along with telling someone they can overclock a CPU is to tell the user that this may lead to a unstable operation and should never be used in a safety critical environment. We should bring out the watchdog timer tutorial and test the theoretical operating limits for each model and silicon die manufacturer.
Hint: Generally, the CPU can be clocked way outside the specified norm as evidenced with this article.
This is the root seed idea for a new competition.
Please promote attribution.
With PIC 16F874A rated at 20 MHz max, 30 MHz worked well for me. No problems.
Does the power consumption go up linearly?? how much more does an over-clocked chip heat up??
It goes up quite noticably, on one of my robots I had to run 6Mhz instead of 16Mhz to double the 1Ah batterys life! (ok, there were a few other adjustments)
linear with frequency, quadratic with voltage
does it run crysis now?
Runs Crysis great, even gets a clean 60+ seconds per frame.
Ahahah I see what you did there :p
with resolution 192.0×108.0!
I’ve overclocked 12F675’s before to 27 MHz for generating video signals..
In my oLogic project, I overclocked a PIC18F26K20 from 16MHz xtal to 24MHz xtal, and used the internal x4 multiplier for 96MHz. The chip was speced to 64MHz. I have never had an issue doing this. I also have the overclocked chip in a comercial product, works extreamly well, and is one of my favorite chips for its speed. And yes, the PIC is 4 cycles per instruction, but its internaly 96MHz, and /4 for a 24MIPS
Here it is in an open project:
http://www.mculabs.com/projects/ologic1.4.html
lol noone mentioned the fact that there are
THREE DIFFERENT SPEED GRADES for AVR chips!
(or more?)
there are 8MHz, 16MHz, and 20MHz AVR chips.
the 16MHz ones go to about 20 or 25MHz
im pretty sure these are the ones used in an arduino
and its the 20MHz one he is overclocking at 30MHz
and i quote:
“microcontroller designed for 20 MHz running at 30 MHz”
What is your point exactly? He over clocked a chip and you seem to be mentioning that there are other chips that run at different speeds. I don’t understand your point, if there is one.
he is pointing it out as some others were confused and thought it was a 16mhz being over clocked to 30mhz .
You don’t need to overclock an AVR, to get higher processing speeds. You just need to ditch that pathetic Arduino and start coding in Assembly.
I think that you can even code the uC bit by bit.
I did that with an Arduino Uno to get it to use Jaromir Dvorak’s AVGA lib last year…you had to switch the 16MHz crystal in and out with the 30MHz one to for the usb to work and flash the hex…but it worked perfectly….pic on my blog of it working…
Funny, I sent it to Hack-a-day and they never put it up…wonder what it different about this guys post.
Hi all,
Everyone seems to just talk about increasing the Xtal frequency. What about increasing the voltage to the chip, let;s say 6V and superglue a small heatsink to the MCU, then put in the XTAL. This seems more the way to go, don’t you thin?
JCooper
I need to over clock a 16Mhz atmega2650 to get faster LCD screen updates. Do I just change the clock speed in the firmware or do I need to change the crystal on the circuit board as well?
hi, i need a sample rate to nearly 77kHz in Arduino uno how can i change the sample rate of 125kHz/13 or approximately 9.6kHz? my work is about Digital Audio Recorder…