Programming using USBasp and avrdude

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

Hi guys! (excuse my english)
i need help using my new USBasp programmer.
the thing is that im using avrdude with windows vista.
i installed WinAVR and now i can use avrdude in the cmd.
everything was coming fine. i download the firmware into a mega8 and build the circuit. I used a ceramic cristal, the ones with 3 pins, connected it to my laptop and ive installed the windows driver.
So everything was setup to program for the first time. i tried to program an atmega8535, so i connected the pins of the atmega8 and the atmega8535 as follow(first the mega8 with his pin number and then mega8535 also with his pin number)
sck( 19 )<-->sck( 8 ) miso( 18 )<-->miso( 7 )
mosi(17)<-->mosi( 6 ) PB2( 16 )<-->rst( 9 )

ok so know im rdy to program it and write this in the command line:

avrdude -c usbasp -p m8535

sometimes a get weird errors like:

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x000102
avrdude: Expected signature for ATMEGA8535 is 1E 93 08
Double check chip, or use -F to override this check.

and sometimes it goes all the way:

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9308

avrdude: safemode: Fuses OK

avrdude done. Thank you.

but thats not my problem. when i try to write something to the flash, i just cant do it, the closest i get to program is this:

avrdude -c usbasp -p m8535 -U flash:w:practica1.hex:i
found 2 busses

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9308
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

To disable this feature, specify the -D option.
avrdude: error: wrong responds size
avrdude: erasing chip
avrdude: error: programm enable: target doesn't answer. 0
avrdude: reading input file "practica1.hex"
avrdude: writing flash (2102 bytes):

Writing | | 0% 0.00savrdude:
error: wrong count at writing 0

and i dont know why, just cant programm it, anyone knows why? pls help

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

See my detailed answer on your other post.

Also look at https://www.avrfreaks.net/index.p...

Wilbur

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

Hi,
I have the same problem,
especially with:
avrdude: error: program enable: target doesn't answer
And I look up for it, and found this: http://yuki-lab.jp/hw/avrdude-GUI/error-e.html.

I couldn't try it out, because I have to go to school in about 30 min. HEHE :D :lol:

Greetings;
Sinistra :shock:

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

Hello,

I am also facing some problems with the newer version of WinAVR and the USBasp compatibility. For me the USBasp is not detected however it shows up in USBview and the device manager.

AVR Rulez...;-)

Warm Regards,
Boseji
http://m8051.blogspot.com/

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

Hello. I need some advices:
1.My laptop is using windows vista. Can anybody share me driver of USBasp (for vista)
1.Can i use AVRStudio4 to program firmware to atmega8 of USBasp.
Thanks very much.

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

You will get intermittent results if the cable from the asp to the target is longer than about 15cm and not properly constructed. (I.e. grounds in the correct place behind the pins). Also check you have set the jumper to drop the clock speed.

Conrad Braam - www.softcircuitry.blogspot.com - www.plcsimulator.org
Always start off poorly, that way when you finally figure it out, you can get a few surprise hits in.

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

I get same problem, I always get this error:

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.

- USB cable is only 1 meter
- ISP cable is only 14 cm
- Power is on

I dont know why, please help. Thanks.

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

Have you tried that link JP3.
With the link in it slows things down.
I have 1 meter of usb cable and 30cm of ordinary band
cable between usbasp and target.
Works perfectly with JP3 in but I get the same as you
with it out.
Make sure you are using the latest version.
It was updated recently.
If you are still in trouble put a "blinky" program in
it to flash those two led. That will test most of your
circuit.

John

If all else fails, read the instructions.

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

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e940a

avrdude: safemode: Fuses OK

avrdude done. Thank you.

However when I try to burn the hex file onto the MCU using the usbasp with the command

avrdude -c usbasp -p m8 -u -U flash:w:blinker.hex

I get the following error

avrdude: no programmer has been specified on the command line or the config file
specify a programmer and try again

I'm getting this error kindly help

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

Here is what I would have used

avrdude -p m8 -c usbasp -e -U flash:w:blinker.hex

Have been using that for some years now.
Can not remember why.

John

If all else fails, read the instructions.

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

Hey solved problems possible with USBasp, Thanks you guys!

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

Hi ,
had the same problem , was using Usbasp with avrdude. It happens so that I had programmed the chip to work at 1MHz and Usbasp does not work if the target frequency is below 1.5Mhz. After some head-breaking found out that there is a Jumper J3 on Usbasp which brings down Usbasp's programming frequency. Just put on the jumper J3 and the error will go away. My suggestion is : prorgram the fuses to a safe value (clk > 1.5 Mhz) and then forget about them . :)