Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Arduino Hex file does not being download in to ATmega128 and ATmega2560

Status
Not open for further replies.

chirag2239

Member level 3
Joined
Jul 29, 2011
Messages
64
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,048
Hi all,

I am working on 2 projects based on Arduino among them one is based on Arduino Mega 2560 and other program is ATmega128. I am trying to load the hex file using ISP programmer and AVR dude.

Please note that I am not using Arduino as an ISP programmer.

I have tried a lot but this hex file of the program could not be downloaded into ATmega2560 and ATmega128. So that I have changed the hex file which is created in Atmel Studio. That works great and I am succeed to load the program in both the controller. Then I checked the size of the program, the program hex file of Arduino is 39kb where the hex file generated of other simple program of LCD interfacing from Atmel Studio is of 3kb size. So after considering the size of flash memory in both the controller, it should be loaded. But it does not.

Can anyone help to solve this problem?

To solve this, I think to try bootloader programming first and then I will load the program by arduino UNO by removing Arduino UNO controller and then will load the file. So I need a bootloader hex file for ATmega2560 and ATmega128.

I could not find ATmega128 and ATmega2560 bootloader file. So can anyone provide the bootloader file of ATmega2560 and ATmega128 in .ino and .hex format?

Please help me to solve this problem.

Thanks.
Chirag
 

FenTrac

Full Member level 3
Joined
Jul 6, 2014
Messages
181
Helped
32
Reputation
64
Reaction score
31
Trophy points
28
Location
West Coast
Activity points
1,388
In the Arduino software download, look through the files in:
arduino-1.0.6/hardware/arduino/bootloaders/stk500v2/
 

chirag2239

Member level 3
Joined
Jul 29, 2011
Messages
64
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,048
Ok thanks and for ATmega128, how can I find bootloader for ATmega128?

- - - Updated - - -

I got to know from my friend that it may be the problem of Reset too. Does it possible if my program is not being loaded and gives the Application timeout error?
Then how can I solve it?

Thanks.
Chirag
 

FenTrac

Full Member level 3
Joined
Jul 6, 2014
Messages
181
Helped
32
Reputation
64
Reaction score
31
Trophy points
28
Location
West Coast
Activity points
1,388
In the above directory, the comments in the file stk500boot.c mention that it supports the atmega128. No personal experience with this processor though.
 

chirag2239

Member level 3
Joined
Jul 29, 2011
Messages
64
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,048
Hi,

Again its a new problem. Yesterday, I have solved the problem of detection of controller. Yesterday I got succeed to detect the controller. But when I tried it today morning, the problem is as it is.

I have done nothing. Yesterday, I read in one forum that try to reduce the frequency and at the zero frequency I mean very low frequency, we may program the controller. So that I reduced the frequency and got succeed, but today morning, I continued my work with same set up, again the problem is as it is. I do not have done anything. I just connect the jumpers again and then started to burn the program in controller as I have set the fuse yesterday, the controller gives the following error as before :

avrdude.EXE: error: programm enable: target doesn't answer. 1
avrdude.EXE: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude.EXE done. Thank you.


It is irritating me now and I could not find a single fault why it is happening, and I am really feeling helpless now.

Because yesterday, everything was perfect and I was getting error of Application timeout so left the effort to solve and my friend told me that it might be the problem of RESET.. So I decided to do that by today and when today I start to work continue, I got the same error. Before I solved the problem, I was getting error due to wrong connection.

I really need someone to help me.

Please help me otherwise I will get mad......!!!:-:)-:)-(

Thanks.
Chirag
 

FenTrac

Full Member level 3
Joined
Jul 6, 2014
Messages
181
Helped
32
Reputation
64
Reaction score
31
Trophy points
28
Location
West Coast
Activity points
1,388
The site listed below gives the following comments on the type of problem described above.
Hope you have already got it working again.

http://www.elecrom.com/2009/04/15/avrdude-tutorial-burning-hex-files-using-usbasp-and-avrdude/

2)target does not answer
message:
found 5 busses

avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

1. Check the connections of USBasp with uC.

2. Check the power supply of the uC.

3. Check whether you have connected the crystal and decoupling capacitors.

4. If everything is fine and still you are getting this error, then it indicates that
either your uC is dead or it's fuse bits have got screwed up.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top