Go Down

Topic: Arduino Mega with ATmega2560 (Read 4543 times) previous topic - next topic

designer2k2

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
http://www.designer2k2.at

cr0sh

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)...?

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

designer2k2

#2
Mar 03, 2010, 08:54 pm Last Edit: Mar 03, 2010, 08:57 pm by designer2k2 Reason: 1
for the http://code.google.com/p/multidisplay/ i need as much as possible  ;)

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  8-)

would be a nice thing, like the Duemilanove when it got the 328 :)
http://www.designer2k2.at

scottmcphee

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...

designer2k2

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  :)

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

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
http://www.designer2k2.at

Mark S

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


designer2k2

#6
Mar 06, 2010, 11:31 am Last Edit: Mar 06, 2010, 11:32 am by designer2k2 Reason: 1
Thanks Mark, that was a super hint  :)

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: http://www.ladyada.net/library/arduino/bootloader.html

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  :)
http://www.designer2k2.at

TchnclFl

Why not just modify the Mega's bootloader?

designer2k2

if i would know how to do that  ;)

can you give me a hand with that?
http://www.designer2k2.at

Mark S

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

Mark

devobitch

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

Jeff K

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
Jeff K - JKDevices.com - home of the MegaMini

devobitch


SaSaa

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 :P just to have it!

Greet work!

SaSaa

#14
Jun 11, 2010, 12:21 am Last Edit: Jun 11, 2010, 12:21 am by sasaa Reason: 1
Can this version be officially brought out so i can buy one or 2?
[size=14]
I think it should be made official! :P[/size]
[/color]

Go Up