USBasp and avrdude

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

Just a quick question for anyone that has this experience.

When programming with usbasp and avrdude6.3, every single time I have to unplug the usbasp and re-insert it or avrdude fails to read the device.

 

If I simply read the fuses, the next time i try to do something it will only work if I unplug and replug the usbasp.

 

I realize this has probably been answered a billion times, but I cannot find the answer when searching.

 

I am using the latest usbasp firmware I can find which is: usbasp.atmega8.2011-05-28.

 

Whether the board is powered by the usbasp or self powered (disconnecting the VCC from the usbasp of course)

the same result occurs.

 

Many thanks in advance.

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

Is this the only USBASP you have?  If it is, get a new one with the superior Chinese firmware! 

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

I have a few of them. I reprogrammed them all because they didn't even contain usbasp firmware.

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

newbie123 wrote:
I reprogrammed them all because they didn't even contain usbasp firmware.

Huh?  That does not make sense, please post a link to where you got them, maybe what you have is not a USBASP.

 

Jim

Does it look like this: https://www.ebay.com/itm/USBASP-...

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Tue. Jun 18, 2019 - 01:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's been quite a few years ago since I bought Chinese USBasp clones, simply because I have enough of them (5 to 10 maybe).

I've read multiple times that a part of the clones are indeed do not have firmware that is compatible with AvrDude, but I've never encountered one myself.

These incompatible versions seemed to started to popup 5 or 6 years ago, and apparently only work with some gui program.

I find a CLI program such as avrdude much easier to work with, as it integrates in a makefile, and is configurable via any decent IDE (Single keyboard button to build and flash).

 

I've also re-flashed all of my USBasp clones with the Fischl firmware from 2011, but I've modified it a bit, because it containes a little bug.

On my trusty Logic Analyser (see my signature) I found out that there is very little time between putting the target into reset, and starting to program it.

I solved it by changing the delay in line 37 of "isp.c" from 1 to 64:

	sck_sw_delay = 64;	/* force RST#/SCK pulse for 320us */

... and then re-compile it and burn it into an AVR.

 

It has been many years ago that I did this., and I first encountered this bug when there were some analog switches (such as 4052) in between the programmer and the target processor.

I think the error AVRdude gave was "Unable to enter programming mode".

Probably an extra delay is also needed if your reset pin has a (big) capacitor on it. If you have such a capacitor, you can also try removing it.

 

If this does not help you, then start with posting the exact command line of AVRdude you use, together with all the output.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

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

ki0bk wrote:

 

 

Huh?  That does not make sense, please post a link to where you got them, maybe what you have is not a USBASP.

 

Jim

Does it look like this: https://www.ebay.com/itm/USBASP-...

Yes Jim they are usbasp clones. I have been using them for years.

 

These clones have been working for years and still work perfectly EXCEPT the bug I posted above.

 

(even though they are atmega8L overclocked with 12MHz crystal)

 

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

Paulvdh wrote:

I've read multiple times that a part of the clones are indeed do not have firmware that is compatible with AvrDude

These incompatible versions seemed to started to popup 5 or 6 years ago, and apparently only work with some gui program.

 

Yes they were compatible with progisp.exe or some chinese program.

I have the same firmware you have from 2011.

 

Paulvdh wrote:
I've modified it a bit, because it containes a little bug.

On my trusty Logic Analyser (see my signature) I found out that there is very little time between putting the target into reset, and starting to program it.

I solved it by changing the delay in line 37 of "isp.c" from 1 to 64:

	sck_sw_delay = 64;	/* force RST#/SCK pulse for 320us */

... and then re-compile it and burn it into an AVR.

 

It has been many years ago that I did this., and I first encountered this bug when there were some analog switches (such as 4052) in between the programmer and the target processor.

I think the error AVRdude gave was "Unable to enter programming mode".

Probably an extra delay is also needed if your reset pin has a (big) capacitor on it. If you have such a capacitor, you can also try removing it.

 

If this does not help you, then start with posting the exact command line of AVRdude you use, together with all the output.

 

I will try this. Thanks for the good advice.

The reset circuit on the target board is a 4.7K pullup and a 10uF capacitor from RST to GND.

I will try removing it to see if it makes a difference.

thanks again

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

fghuj

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Mon. Jun 24, 2019 - 08:42 AM