Arduino mega at2560 overclock 20mhz

I hope that someonr could help me.

I've just ask to intalian forum but without success ( they help me but doesn't work )

I need to use at2560 at 20mhz becouse I need to drive matrix display

( 2 project one with sure 3216 bicolor 3 panel and one with rgb matrix panel by adafruit)

So this is why I need more "power"!

They suggest to me to change ( add) in board.txt file the atmega configuration at 20mhz (done)

Now with a 20mhz oscillator board doesn't work probably becouse the bootloader don't accept new oscillator.

So I need a bootloader that works at 20mhz. I think I should burn it via icsp.

So they posted ( see in italian section) the hex file for bootloader for 20mhz oscillator.
The problem appear when ilI try to burn it. ( see the picture for error)

The original bootloader is 21kb while the midified 25kb

Could someone post a working bootloader for atmega2560 that run at 20mhz ?

Thank you so much

Daniele

So this is why I need more "power"!

Are you sure that your code is optimised and that you cannot use the Arduino at its native speed ?

Should be compatible

I' using ds1307 adafruitgfx e button library

Anyway there should be only one way to be shire: try it !

What is it that made you think you needed to overclock the Mega ?

I need to use at2560 at 20mhz becouse I need to drive matrix display

2560 is up to 16MHz so it is not good idea.

The original bootloader is 21kb while the midified 25kb

The size may vary depending on compiler and library version. Why don't you create HEX yourself? Just edit the F_CPU parameter in Makefile and make.

Here is ad-hoc, you can try.

Mega2560-prod-firmware-2011-06-29.hex (22.5 KB)

I NEVER compiled bootloader

Could you telle me EXATELY step by step how to do this ?

I never use Makefile

I think I need to use prompt DOS ( cmd )

I think I should go in which folder ?

Please write here the Steps and I'll try to compile by myself

What I should change ? ( where is writtne the frequncy ?)

Why you don't suggest to use mega at 20mhz ?

Thank you so much

Daniele

First you have to have working AVR tools. It requires defined path to AVR tools if Windows.
In Arduino ..\hardware\arduino\bootloaders\stk500v2 (for mega2560) folder are files which you need .
Makefile is a script, there is the mega2560 section and there is F_CPU value in Hz. You can put there what you need and then simply run in CMD "make mega2560" (you have to be in folder). That's it.

i know this is an OLD one

but i need to do excatly the same

for some 3d printer electronics that uses the 644 chip i have made a daughter board with the 2560 chip

the printer electronics has a crystal for 20Mhz and you could argue i could just change the crystal.

I looked in the make file and it seems simple enough just to change the freq

but how do i set path so the command above will actually work?

i have arduino IDE 1.6.8 extracted to a folder on the desktop.... ie i downloaded the zip option

would this be what i would need to add to PATH

arduino-1.6.8\hardware\tools\avr\bin

?

Hi Bo... I came looking for the same information for our board and found your question dangling - guess we need to develop this expertise...!