Downloading to atmega2560

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have sent the following instructions via command prompt. avrdude -v -p atmega2560 -c usbasp -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m -U efuse:w:0xFD:m. While it appears to be working. But the atmega2560 does not appear to be programmed.

This topic has a solution.

Murray Scott

Last Edited: Tue. Aug 15, 2017 - 04:40 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not nearly enough information. Just saying "the atmega2560 does not appear to be programmed" tells us nothing about what you were expecting to see or what you are actually observing. And anyway avrdude will have told you at the end whether it succeeded or not - what did that say?

 

A very common fault is to program the wrong hex file so you keep making changes and building a new .hex but what you are actually programming into the device is the same old, out of date .hex from some previous build. So are you even sure it's the right .hex ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

Not nearly enough information. Just saying "the atmega2560 does not appear to be programmed" tells us nothing about what you were expecting to see or what you are actually observing. And anyway avrdude will have told you at the end whether it succeeded or not - what did that say?

 

A very common fault is to program the wrong hex file so you keep making changes and building a new .hex but what you are actually programming into the device is the same old, out of date .hex from some previous build. So are you even sure it's the right .hex ?

I did not see a .hex file in the command line, only fuse settings????

 

Jim

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no harm in setting fuses in a separate command.    In fact it is very WISE.

 

Since there is a -v switch,   avrdude will report the fuse values afterwards. e.g.

avrdude -v -p atmega2560 -c usbasp -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m -U efuse:w:0xFD:m

 

If in doubt,   just do an empty command to check the result:

avrdude -v -p atmega2560 -c usbasp

This is considerably easier than writing the specific read fuses command:

avrdude  -p atmega2560 -c usbasp -U hfuse:r:-:h -U lfuse:r:-:h -U efuse:r:-:h

Oh.   I just tried your fuse write command.   And sure enough it reports a Signature error but a subsequent "fuse read" shows that the fuses were written correctly.

Edit.  I rather foolishly tried your command without seeing what it does.

In fact it only selects the Boot area.   My Arduino Mega2560 is setup for a 4096 word Boot.

 

Remove the -v switch and avrdude will stop reporting an error.    Anyway, since it verifies the fuses as default, there is no need for -v.

It looks as if this is a minor bug-ette of avrdude.    Just live with it.

 

David.

Last Edited: Fri. Aug 11, 2017 - 01:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
There is no harm in setting fuses in a separate command.  

But if the OP was expecting that command to program the app, then he'd be disappointed - and might even say, "it doesn't work".

 

As the others have said, the OP isn't clear about what the actual problem is

 

EDIT

 

typo

Last Edited: Fri. Aug 11, 2017 - 02:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My apologies the post was a little short on detail. I have been trying load bootloader for etmega2560 using the ardriuno IDE AND keep getting errors that the USBasp might require latter firmware!

Murray

Murray Scott