Problems trying to flash a USBasp

Hi all :slight_smile:

I have received this programmer for two days and I can´t upload the firm to work to uploading sketches..

I have seen very many tutorials and does not work for me...

The usb that I have is this:

http://www.ebay.com/itm/310506909410?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

ATMEGA8 ATMEGA128 device with 5v and 3.3v.....

But the problem is when I plug the arduino WITH 5V/3.3V JUMPER in usbasp..The arduino turns off (Without this jumper arduino is ok), and I check the wires like 20 times...The jp2 jumper is in short like says the instructions around the internet..

The avrdude tells me some errors of connectivity (Port ok and baudrate ok), also he can´t find usbdevice with vid=0x16c0 pid=0x5dc ...

I take a look on this sites:

http://www.fischl.de/usbasp/Readme.txt
http://www.nexuscyber.com/boards/topic/1/how-to-use-arduino-uno-upgrade-usbasp-firmware
http://www.rogerclark.net/?p=702
http://www.ladyada.net/learn/avr/avrdude.html
http://forum.arduino.cc/index.php?topic=149668.0

And not works....Firmwares I downloaded from many sites.....

Someone can help me to upload the firmware ???

Thanks and regards :slight_smile:

Just to cover all the bases, let's confirm some things.
First ,
How are you powering your arduino ?
I don't see any information in your post or your link that indicates whether the USBasp programmer also supplies power to the arduino. Can you confirm or deny that ?
Where do you plug the USB connector for the programmer ?
I assume the ribbon cable is keyed or marked to indicate the correct orientation at the arduino ICSP connector end?
Can you post a photo of you setup showing the programmer and arduino ? (is it possible to get them close enough together to be in the photo ?

Carlos_2K14:
I have received this programmer for two days and I can´t upload the firm to work to uploading sketches..

This sounds rather convoluted.

The USBASP programmer already has its firmware installed, and Alice is a pretty reliable supplier whom I would expect to be supplying parts with the most recent and correct firmware already, so there should be little or no requirement to upgrade that firmware, certainly not for a mega[13]28.

It should therefore only be necessary to connect it to your target Arduino and select "USBASP" as the programmer, select your COM port and board type, then "Upload Using Programmer" in the first menu. Are you doing something different to this?

What Arduino are you attempting to program, and to what jumper are you referring?

Hi raschemmel :slight_smile:

raschemmel:
Just to cover all the bases, let's confirm some things.
First ,
How are you powering your arduino ?

With usb wire.

raschemmel:
I don't see any information in your post or your link that indicates whether the USBasp programmer also supplies power to the arduino. Can you confirm or deny that ?

Only power supply is with arduino trought the usb wire.

raschemmel:
Where do you plug the USB connector for the programmer ?

In any usb port.

raschemmel:
I assume the ribbon cable is keyed or marked to indicate the correct orientation at the arduino ICSP connector end?

Yes, and the wires are as follow (10 pin):

raschemmel:
Can you post a photo of you setup showing the programmer and arduino ? (is it possible to get them close enough together to be in the photo ?

Yes, tomorrow I upload the pic.

Thanks and regards :slight_smile:

Hi Paul__B :slight_smile:

Paul__B:
This sounds rather convoluted

It is.

Paul__B:
The USBASP programmer already has its firmware installed, and Alice is a pretty reliable supplier whom I would expect to be supplying parts with the most recent and correct firmware already, so there should be little or no requirement to upgrade that firmware, certainly not for a mega[13]28.

Ok, but ide shows something different.

Paul__B:
It should therefore only be necessary to connect it to your target Arduino and select "USBASP" as the programmer, select your COM port and board type, then "Upload Using Programmer" in the first menu. Are you doing something different to this?

Yes, I do this and it fails.

Paul__B:
What Arduino are you attempting to program

I tried it with two mini, two atmega328 and two attiny84

Paul__B:
what jumper are you referring?

The jumper that select 5v or 3.3v.

Thank you for the answer and regards :slight_smile:

The arduino only has a 6-pin connector. That won't work without a chip select pin.
There's no chip select (the SPI pin for chip select is called "SS". The default is d10 it can be any pin)
My Kickstarter Tiny85ISP won't work without a jumper between the ATtiny85 chip pin-1 (chip select for the SPI interface) and pin-10 on the arduino UNO. Do you know which pin of the ATmega128 Do you have a schematic of the programmer - atmega128 interface with signal names ?

That would explain why you can't communicate between the programmer and the ATmeg128 but it doesn't explain why your Mac does't recognize the programmer USB. Did you install the driver ?

Carlos_2K14:

Paul__B:
there should be little or no requirement to upgrade that firmware, certainly not for a mega[13]28.

Ok, but IDE shows something different.

And what does it show? You need to quote the message.

Carlos_2K14:
Yes, I do this and it fails.

You need to quote the message. If it is the one you mentioned first, it means that avrdude is simply not finding your ISBASP and clearly nothing will ever work until it can do so; there is no point connecting anything else.

Carlos_2K14:
I tried it with two mini, two atmega328 and two attiny84

What sort of "mini"? Weblink? How did you have the other two chips mounted? Crystals? Have you read Nick's tutorials?

Not that this matters anyway if avrdude is not connecting.

Carlos_2K14:
The jumper that select 5v or 3.3v.

On the USBASP? Why would you be changing it? What do you mean by "The Arduino turns off"?

OK, I'll leave it to you Rasch!

OK, I'll leave it to you Rasch!

Thanks. You're too kind. XD

and I can´t upload the firm to work to uploading sketches..

I have seen very many tutorials and does not work for me...

What does this mean ? What does firmware have to do with programming an AVR chip ?

Picture of Wire the circuit
Connect the Arduino to the ATtiny as follows:
Arduino +5V ---> ATtiny Pin 8
Arduino Ground ---> ATtiny Pin 4
Arduino Pin 10 ---> ATtiny Pin 1
Arduino Pin 11 ---> ATtiny Pin 5
Arduino Pin 12 ---> ATtiny Pin 6
Arduino Pin 13 ---> ATtiny Pin 7

ISP PINOUT.jpg

Hi :slight_smile: Is solved :wink:

The problem was the wiring...And Raschemmel has given me the clue:

"I assume the ribbon cable is keyed or marked to indicate the correct orientation at the arduino ICSP connector end?"

I answered "yes" and no, the 10 pin connector was on the contrary..

I changed the wires and I upload sketches normally..Right now I uploaded 2 blinks on both atmega328..

Tomorrow will try on the attiny chips..

@Paul__B: I have left several different messages, like "cannot set sck period. please check for usbasp firmware update.", and you´re right, and was not necessary to upload any firmware..With "mini" I want to say "arduino pro mini"..Crystal ok with 2 caps to gnd and to xtal1 and 2..This USBasp has a jumper that allows select the imput, 5V or 3.3V..(And shut down because the wires are misplaced..)

@Raschemmel: The problem has come because not work from the beginning, and started to reading posts in forums and blogs, and people said that "before to using the USBasp, had to upload a firmware", and I've gone mad with avrdude with very many errors..

That I said, try the Attiny chips tomorrow and we see what happens..

Thank you :slight_smile:

Regards :slight_smile:

It sounds like your 328 is up and running.
Let me tell you about a problem that drove me nuts with the Kickstarter Tiny85ISP.
It has a 6 pin ICSP connector just like the arduino UNO.
When I first tested it I got an error. I (being a hardware tech and not a programmer ) only have one tool in my toolbox and that is a hammer so to me , everything looks like a nail. My tech natural response is start ohming out everything with a meter to check continuity. I looked at the wiring diagram (schematc for the interface) between the tiny and the UNO for the SPI interface.
At the tiny end of the ribbon cable , the ICSP RESET (pin-5) should connect to the tiny85 , pin-1 , which it does. Then I looked at the schematic, looked at the UNO ICSP connector , looked at the UNO pinout and at the UNO end, the RESET (pin-5) of the ICSP connector is supposed to (AND DOES !) connect to the UNO RESET pin, (NOT PIN D10) ! . So I realized after ohming everthing out,
that if I used the ribbon cable as it came from the vendor, pin-1 of the tiny85 would be SHORTED to the UNO RESET pin and NOT connected to d10 (the "SS" SPI chip select pin). After verifying that I could program the tiny without problems using a breadboard setup with the UNO d10 pin connected to the tiny85 pin-1 (chip pin-1 , not port pin-1) I realized the solution was to CUT the ribbon cable wire going to pin-5 (RESET pin) of the ICSP connector and ADD a jumper wire from UNO -d10 to TINY85, pin-1. The tutorials
all say the UNO RESET pin should be connected to a 10uF cap.. So I cut the wire , and the TinyISP worked fine from that point on.
There was no other solution because the PCB was correct at the TinyISP end. Pin-1 IS the tiny85 RESET pin. The problem was that
the RESET pin at the UNO end went to the UNO RESET pin, NOT pin d10.

before to using the USBasp, had to upload a firmware

Were those post talking about firmware to upgrade the USBasp to the lastest rev ? (as opposed to meaning USB driver or something else )

I answered "yes" and no, the 10 pin connector was on the contrary..

I believe what you mean is the connector was on backwards (reverseed)....

Hi and good morning :slight_smile:

raschemmel:
It sounds like your 328 is up and running.[7quote]

Yes, is up :slight_smile:

raschemmel:
At the tiny end of the ribbon cable , the ICSP RESET (pin-5) should connect to the tiny85 , pin-1 , which it does. Then I looked at the schematic, looked at the UNO ICSP connector , looked at the UNO pinout and at the UNO end, the RESET (pin-5) of the ICSP connector is supposed to (AND DOES !) connect to the UNO RESET pin, (NOT PIN D10) ! . So I realized after ohming everthing out,
that if I used the ribbon cable as it came from the vendor, pin-1 of the tiny85 would be SHORTED to the UNO RESET pin and NOT connected to d10 (the "SS" SPI chip select pin). After verifying that I could program the tiny without problems using a breadboard setup with the UNO d10 pin connected to the tiny85 pin-1 (chip pin-1 , not port pin-1) I realized the solution was to CUT the ribbon cable wire going to pin-5 (RESET pin) of the ICSP connector and ADD a jumper wire from UNO -d10 to TINY85, pin-1. The tutorials
all say the UNO RESET pin should be connected to a 10uF cap.. So I cut the wire , and the TinyISP worked fine from that point on.
There was no other solution because the PCB was correct at the TinyISP end. Pin-1 IS the tiny85 RESET pin. The problem was that
the RESET pin at the UNO end went to the UNO RESET pin, NOT pin d10.

Maybe for that the attiny84 don´t work, and ide show this error:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

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.




??

Look....."Firmware update"....xD

The connections:

USBASP -----> ATTINY84
VCC CHIP PIN 1
GND CHIP PIN 14
MOSI CHIP PIN 7
MISO CHIP PIN 8
SCK CHIP PIN 9
RESET CHIP PIN 4

![](http://fc04.deviantart.net/fs70/f/2013/038/3/7/attiny_web_by_pighixxx-d5u4aur.png)



> before to using the USBasp, had to upload a firmware




> raschemmel:
> Were those post talking about firmware to upgrade the USBasp to the lastest rev ? (as opposed to meaning USB driver or something else )



Because the device don´t work (I started looking for information, and people everywhere saying that the firm had to load before to use it, but I guess that its on old boards.....)



> I answered "yes" and no, the 10 pin connector was on the contrary..





> raschemmel:
> I believe what you mean is the connector was on backwards (reverseed)....



Yes, backwards or reversed, sorry...

Regards :)

Right now, I put the oscilator with two caps on xtal 1 and 2 and ide shows this error:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.

But "Load complete" appears at the end of the screen...

Regards

Solved !!!

Did not have a cap to test and I put a 120 resistor between reset and gnd of arduino uno, I upload the bootloader and I upload the blink on pin D7, and a picture is worth than a thousand words:

Thank you for your support :slight_smile:

Regards :slight_smile:

Carlos_2K14:
Right now, I put the oscilator with two caps on xtal 1 and 2 and ide shows this error:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.

avrdude: warning: cannot set sck period. please check for usbasp firmware update.



But "Load complete" appears at the end of the screen...

This was extensively and thoroughly dealt with in a recent discussion, which I suggest you read in detail, though in the event, it apparently does not really matter anyway in most cases.

As to the problem that raschemmel describes, this is dealt with in one of Nick Gammon's excellent tutorials.

Hi Paul :slight_smile:

I had read that and was not a error (Same of error PAGEL and BS2 signals), but I could not upload the sketch....

And exactly, that is what Raschemmel said (Cut the wire and attach a pin header)

Regards :slight_smile:

Did not have a cap to test and I put a 120 resistor between reset and gnd of arduino uno, I upload the bootloader and I upload the blink on pin D7, and a picture is worth than a thousand words:

So it's working now ?
Can you please post the wiring connection BEFORE and AFTER you got it working ?
Are you saying it started working when you put a 120 ohm resistor between RESET and GND on the UNO ?

Also,
I found this. I don't know if you've seen it:

raschemmel:
So it's working now ?
Can you please post the wiring connection BEFORE and AFTER you got it working ?
Are you saying it started working when you put a 120 ohm resistor between RESET and GND on the UNO ?

Also,
I found this. I don't know if you've seen it:
USBASP ICSP Programmer Quickstart Guide | Freetronics

Hi Raschemmel :slight_smile:

Yes, the attiny84 is working now :slight_smile:

The wiring? OK...Look this pic (Right):

And turn over all pins (Pin 1 MOSI on Pin 2 VCC, Pin 5 RESET on pin 6 GND and etc...)...I had the wires backwards.....

The resistor..I read a post of a blog (I do not remember which), and the user was saying that he dont have any cap, so with a 120 resistor he had worked..With first attiny, the resistor works ok (I have another attiny84 but I have not yet tested..)

The link that you post I had seen, and even I soldered two pairs of male pinheaders (One for the progrmming mode and another one for the slow clock function, JP2 and JP3), but ide reports me many failures and I left it (Even with the jumper slow clock JP3, the USBasp turned off...)

Regards :slight_smile:

I use a resistor connected to a switch that has ground on the other side of the switch for a RESET button. Press the switch to connect the reset pin to ground through the resistor.

raschemmel:
I use a resistor connected to a switch that has ground on the other side of the switch for a RESET button. Press the switch to connect the reset pin to ground through the resistor.

I am more animal....Single wire on reset pin and I put on GND xD

Regards :slight_smile: