USBASP not showing up in ports in IDE (Mac) (trying to program ATTiny85)

Hi,

So I have one of those cheap USBASP programmers (specifically USBASP V2.0 LC Technology here ) and I'm trying to use it to upload sketches to an ATTiny85.

The ATTiny85 is in an SMD package so I have to program it already on the PCB. I've got the USBASP ribbon cable plugged directly into my PCB (6 pin), which connects to the relevant pins of the ATTiny85. I've programmed regular DIP8 ATTiny85s before so I don't think the issue lays with that.

What's happening is that when I plug my USBASP in, nothing shows up under Ports. Trying to select other things like "Burn Bootloader" or "Upload using programmer" also have no affect, regardless of whether programmer is set to USBasp, AVRISP mk2, or Arduino as ISP.

The error message that comes up when trying to upload is this:

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/ivantregear/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : usbasp
AVR Part : ATtiny25
Chip Erase delay : 4500 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 6 4 0 no 128 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 2048 32 64 4500 4500 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : usbasp
Description : USBasp, USBasp - USB programmer for Atmel AVR controllers - fischl.de

avrdude: auto set sck period (because given equals null)
avrdude: error: program 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.

the selected serial port
does not exist or your board is not connected

I'd really appreciate a little help with this, as I've been looking around on the internet for the last hour and haven't found a solution.

P.S: as a little heads up, I'm pretty experienced with electronics and the sort, but programming isn't my forte so if the solutions requires something beyond the Arduino IDE, please be patient as it's likely completely new to me!

Thank you very much,
Ivan

Nothing should show up under ports, the USBAsp does not appear as a port. Did someone write a tutorial recently that said something wrong about this? In the last few weeks all of a sudden people are posting under the mistaken belief that the USBAsp is supposed to appear as a port, when that used to be a really rare question.

The error you are getting almost always indicates a wiring problem, recheck wiring. Did you plug the cable in the right way around? (backwards connector will produce that error)

Is that an own-design board? If so, check soldering (be particularly attentive to the pins on the t85 - with the smd chips, if you're not really good at soldering SMD parts, you can end up with a pin that looks soldered, but doesn't actually have any solder under it - and when you test it with a multimeter, you'll press down on the pin and it will test okay; you can guess how that ended up on my checklist), as well as schematic/connections. Did you use the right pins for MISO/MOSI? (the pins you use for MISO and MOSI when programming are the opposite of what you use when the tiny85 is master - this applies to all the attiny's with a USI). Did you mount the connector for the cable on the wrong side of the board? (yup, I've done it)

Is that board a digispark clone, something that was meant to be used via VUSB (ie, does it have a USB connector on it)? Those often have RSTDSBL fuse set; if this is the case, you cannot program that board with an ISP programmer without first using an HVSP programmer to reset the fuses.

Wow that's a long lists of things I should and hadn't considered.
I'll touch up the soldering, but I'm fairly sure the wiring is correct, as I said it's exactly the same as the wiring I've used when programming a DIP version.

So if it's not meant to show up under ports, how is it supposed to work. Plug in, click upload using programmer and that's it?

Cheers,
Ivan

Edit: Just to add to that, I just tried to use the same USBasp to program a DIP attiny85 I had laying around. Double checked the wiring, still nothing. The error is the same as before "port does not exist...".

ITregear:
So if it's not meant to show up under ports, how is it supposed to work. Plug in, click upload using programmer and that's it?

It's a pure USB device. It doesn't use a virtual COM port like the Arduino boards do. So yes, you just plug in, and click "Upload Using Programmer" and that's it. The Tools > Port menu selection makes no difference for this operation.

ITregear:
The error is the same as before "port does not exist...".

Don't get distracted by the part about "the selected serial port
does not exist". This is a generic error message from the Arduino IDE that is meant to apply to a wide range of upload errors. The second part of the error message is more fitting in this case: "or your board is not connected".

Ok so I used to program the DIP attiny85s using one of those homemade shields for an Uno and everything worked brilliantly. I've just been playing around and now nothing works.

I use the USBasp to program my uno (to see if the issue was with the usbasp). It uploaded a sketch just fine. However then my uno couldn't be programmed by regular usb, which I expected. So using the usbasp I burnt the bootloader back onto my Uno. Again, great, I can now upload sketches like I used to.

I now try to program my smd attiny85 using that homemade shield (which I've used successfully on over 30 different attiny85s) and same errors as before. So just to be safe I tried to program a DIP attiny85 using the shield, and suddenly nothing works.

This used to work perfectly and easily. I'd upload the ArduinoISP sketch to the Uno, plug the attiny85 in, choose that board, select Arduino as ISP and click upload and it would be fine.

Is there a possibility I've broken something by uploading to my Uno using the usbasp?

Still no luck with the smd attinny85, any other suggestions?

Thanks,
Ivan

ITregear:
I'm trying to use it to upload sketches to an ATTiny85.

...

AVR Part                      : ATtiny25

I doubt it's related to the error you got, but why do you have ATtiny25 selected when you're trying to upload to an ATtiny85?

Ah that must have been a mistake in that first case, but I thoroughly checked with subsequent attempts and even when I had Attiny85 selected it wouldn't work.

Ok so even more woes.

I cannot seem to upload to any ATtiny85 at all now.

I've tried again and again, using different IDE versions, and different tiny libraries, but I also get the identical error message:

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/ivantregear/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/cu.usbmodem14301
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATtiny85
Chip Erase delay : 400000 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 12 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 8192 64 128 30000 30000 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 425479
Firmware Version: 8430084.-1443180712
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected

Is there anything in here that indicates what's going wrong? I've tried a chip that I know works so that's not the issue. I've checked the wiring a thousand times so we're good there. The only thing I can think is that somehow progamming my Uno using the USBasp has messed it up somehow.

Is this possible.

Please help :frowning:

-Ivan

That most recent error can be solved by putting a 10uF cap between reset and ground on the Arduino as ISP being used as programmer. (After uploading Arduino as ISP to it. Remove the cap before uploading other sketches, as it will prevent uploads from working)

You are beautiful, thank you so much, right as rain.

Any thoughts on why I was able to program the attiny without that cap this whole time, and it only suddenly needed it now?

-Ivan

Arduino recently changed the Arduino as ISP definition to use the "arduino" protocol instead of the "stk500v1" protocol. This was done to allow ATmega32U4-based boards like Leonardo to be used as Arduino as ISP on Windows, which doesn't work with the "stk500v1" protocol. A side effect of this change was making it more likely that the 10 uF reset disable capacitor would be needed for the non-ATmega32U4 boards. So many people who had no problem with their Arduino as ISP before the change suddenly found that they didn't work. The capacitor is not always needed. Some reported that they needed it even with the "stk500v1" protocol. Some can get by without it even with the "arduino" protocol.

In order to resolve the breakage caused by the change of protocols, I reverted that change for the Arduino as ISP programmer and added a new "Arduino as ISP (ATmega32U4)" programmer to retain support for ATmega32U4-based boards on Windows:

There has not been a release of Arduino AVR Boards since that change was made, so it's not readily available.