Arduino Mega with ATmega2560

Hello,

im searching for the biggest (in terms of programm space) Arduino. The mega with 128k is already nice, but wouldnt the pin compatible ATmega2560 with 256k be sweeter?

Datasheet from the ATmega1280 ATmega2560: http://www.atmel.com/dyn/resources/prod_documents/2549S.pdf

So my question is, can i swap the ATmega1280 with the ATmega2560 (desolder and solder is ok for me) what do i need to change that i can burn the bootloader and that the Ide gives me the option to upload to it?

greets from Austria,
d2k2

Well, it looks pin-compatible, so the solder/desolder and swap should work electrically.

But you are going to have to do a bit of other work on the bootloader, IDE, fuse settings, and possibly even the standard libraries (?) to get it to work, I would think? I have no clue about this, though.

May I ask what your application is going to be that you need so much program space (that's a lot of space)...?

:slight_smile:

for the GitHub - designer2k2/multidisplay: The MultiDisplay Project, An opensource datalogger, boost controller and display for cars i need as much as possible :wink:

currently we hit the 32k limit with just the functions we have, thats where the idea with the ATmega2560 came up...

As its the biggest ATmega currently i think it should be in a Arduino :sunglasses:

would be a nice thing, like the Duemilanove when it got the 328 :slight_smile:

Hey, don't grow that multidisplay into an full blown OBD computer!

Speaking of which, I couldn't help but to notice that I can go and buy and plug in a $70 item into my OBDII port on the car and get most of things you're trying to wire up to the Arduino.

It has buttons and LCD screen, and can scroll through all the reported parameters...

OBD is not what we plan, ECU´s are seeding the data with a maximum of 1hz over OBD, with that you cannot see overboost or knock during shifting and so on...
its measuring everything what the OBD cannot deliver, like a race computer, with features in the making like boost controler and so on.

But back to the thead :slight_smile:

Im contacting Seeedstudio how they think about making a Mega with the 2560, and hopefully they will make a small batch :sunglasses:

So far i went trough the data sheet and the fuses look identical, i think the bootloader should also work, just the ide needs a new entry in the list with the different chip.

But would be great to get somebody how realy know what he is doing here ;D

The Liquidware TouchSlide display uses the 2560 so you should be able to use the core files from that to get it to work. It works great and is fully arduino compatible. You can get their libraries from github/liquidware

Here is the entry from boards.txt

##############################################################
#Board Description

slide.name=TouchShield Slide
slide.group=Arduino

slide.build.core=touchshield
slide.build.mcu=atmega2560
slide.build.f_cpu=16000000L

slide.reference=hardware/cores/arduino/reference/index.html

slide.upload.protocol=butterfly
slide.upload.maximum_size=250000
slide.upload.speed=57600
slide.upload.mcu=m2560

#ANT core targets
slide.targets.sketch.verify=build.all
slide.targets.sketch.upload=upload.sketch
slide.targets.bootloader.upload=upload.bootloader

Thanks Mark, that was a super hint :slight_smile:

With the addition above its possible to load a sketch into a ATmega2560, now i need the Bootloader for it.

When taking a look at the Lady Ada Bootloader page: Arduino Hacks

there is described how to modify and make a bootloader, next when looking at the Bootloader code: hardware\arduino\bootloaders\atmega*ATmegaBOOT_168.c*

There are a lot of places where the ATmega1280 is mentioned, if i would now just duplicate (or expand the if) them and adapt for the ATmega2560 i think it works :-?

Need to get a Mega and a ATmega2560 to try that :slight_smile:

Why not just modify the Mega's bootloader?

if i would know how to do that :wink:

can you give me a hand with that?

Contact Liquidware, I am sure they will give you their bootloader. Tell them I sent you (Mark from NJ)

Mark

hi all

just getting into the mega now

i cant get the mega 2560 to work
its says

avrdude: Expected signature for ATMEGA1280 is 1E 97 03
Double check chip, or use -F to override this check.

any ideas?

devo

devobitch... I assume you are selecting the Mega board in the Arduino IDE?

One way to fix this is to add this to your boards.txt file... which is located in your arduino\hardware\arduino folder. Note that the fuse bits may be incorrect as I just copied the code from the Mega. Also the maximum_size could be increased. You should be able to find those settings with a google search. But as is, this should let you upload a sketch without getting the signature error. Just make sure you restart the Arduino IDE after updating this file and select the Arduino Mega2560 instead of Arduino Mega.

#######################
mega2.name=Arduino Mega2560

mega2.upload.protocol=stk500
mega2.upload.maximum_size=126976
mega2.upload.speed=57600

mega2.bootloader.low_fuses=0xFF
mega2.bootloader.high_fuses=0xDA
mega2.bootloader.extended_fuses=0xF5
mega2.bootloader.path=atmega
mega2.bootloader.file=ATmegaBOOT_168_atmega1280.hex
mega2.bootloader.unlock_bits=0x3F
mega2.bootloader.lock_bits=0x0F

mega2.build.mcu=atmega2560
mega2.build.f_cpu=16000000L
mega2.build.core=arduino

yes thanks it works now

aaah cool it's working?
i own a mega and NEVER got low on space...

Not that need that much of space but dam it would be cool :stuck_out_tongue: just to have it!

Greet work!

Can this version be officially brought out so i can buy one or 2?

I think it should be made official! :stuck_out_tongue:

the atmega2560's are on ebay
i bought 2
but most of the lcd's and other boards
i bought dont work i am still in the process of
trying to learn how to program and modify the i/o ports

mark

I have modified the standard bootloader to work on the 2560 mega.

http://www.cbxdragbike.com/arduino/bootloaderdocs/index.html

One important note, it only supports 128K bytes because the stk500 v1 protocol only supports 128k bytes.

Also, there is a bug in the gcc 4.3.2 compiler that really limits you to much beyond about 80K program space. This if fixed in gcc 4.4.0 and later.

I am working on an stk500 v2 bootloader for the 2560.

Mark

Funny you should bring this up I was just looking at one today. You might want to check out eMartee at www.emartee.com. They sell the board and have a post on how to get the bootloader, as a matter of fact they have everything on thier site. I was logging in to ask if anyone had dealt with this company before I placed my order for one.

I was logging in to ask if anyone had dealt with this company before I placed my order for one

Hi, i have more than once bought things from emartee, at ebay. I am very pleased about this seller on ebay. emartee2009 on eBay
Correct and fast shipping. I did not bought on their site yet.

Hi, Mark, have you got any result on stk500 v2 bootloader for the 2560?
Thanks a lot for your time.