Running Arduino at  more than 16MHz!

Hi how to run Arduino at more tahn 16MHz!
What MCU are compatible to run Arduino at >16MHz?
I'm looking to run it at 32MHz!

Thanks in advance! :slight_smile:

AFAIK there are no Arduino compatible MCUs that run at speeds that high.

You could, of course, write your own bootloader for an Atmel chip that could run that quickly, but that would be quite a lot of work, and if you're inexperienced, it would be very difficult.

I don't even know if any ATmega chips can run that quickly to be honest. I know that the ATmega168/328/644 can only run at up to 20MHz.

http://atmel.com/dyn/products/devices_v2.asp?family_id=607#760

Looks like you're out of luck.

Can I run Arduino on ATmega328P at 20MHz ? if yes how?

Why?

Replace the 16MHz Crystal with a 20MHz Crystal, build a and load a new bootloader with the appropriate variables set to 20MHz, create a new board in boards.txt specifying the run frequency of 20MHz, and you should be all set.

An ATxMega will run at 32MHz...

Why?

I think that's a reasonable question. There's probably an easier work around that doesn't involve writing a new bootloader..

How to build a and load a new bootloader with the appropriate variables set to 20MHz ?

Is there anyone who has done this before?

In order to flash the bootloader you need an ISP. If you have an ISP you do not need a bootloader. Just extend boards.txt as described in the playground and flash with the ISP.

My standard recommendation: go for the AVRISPmkII and set it with AVR Studio to 4Mhz (or anything below target frequency / 4). It will remember the setup. Then use it as descibed above --> no bootloader needed and much faster upload speed.

Udo

How to build a and load a new bootloader with the appropriate variables set to 20MHz ?

It looks like there is a a "pro20" target in the bootloader makefile that should work as-is. It's a bit disturbing that the implied pro-20 board hasn't seen the light of day...

Building an installing a bootloader requires a bit of knowledge about the more traditional techniques of building and loading software in a C environment, as well as some specialized hardware. You need to figure at least some of that stuff out, because (IMO) it's a bit beyond the realm where one can simply follow "cookbook" advice without running into problems.

Sorry, this is probably not what you're looking for but I couldn't resist: Antipasto Hardware Blog: My Overclocked, Liquid Cooled Arduino

And one another problem is delayMicrosecond function.
I place a hack for 20Mhz if you mind.
http://code.google.com/p/arduino/issues/detail?id=306&start=100

Same bootloader can be used for both 16MHz and 20MHz. One can swap (with a switch) the crystals: use the 16MHz crystal when uploading, then switch to the 20MHz crystal to run the uploaded application.