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.
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!
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.
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.
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...".
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.
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".
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.
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.
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)
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:
The Device Manager reports the USBasp as a "libusb-win32 devices" "USBasp"
Device Type libusb-win32 devices
I am using the drivers from www.fischl.de as defined by Atomic Market.
The USBasp device reports "The device is working properly."
It appears that I can not communicate at all with the Arduino PRO.
The "Port" option under "Tools" is grayed out.
Design Manager does report the USBasp Properties, Location as Port_#0001.Hub_#0001.
I don't know if this "Port" is the same as or similar to a COM Port?
The correct term is "upload" not "download". How are you going about the upload. When you do a standard upload via the upload button or Tools > Upload it attempts to do an upload over the COM port selected in the Tools > Port menu, which is not what you want for uploading via a USBasp. What you want is called "Upload using programmer" Which you can do by holding the shift key while clicking the Upload button or Sketch > Upload using programmer.
Now I think you're experiencing the problem with libusb-win32 not working with the recent Arduino versions of AVRDUDE. You can fix this by installing the libusbK driver for your USBasp using Zadig:
If you end up needing specific instruction for doing that let me know and I'll provide them.
I now have libusbK drivers. The USBasp is "working properly". I can no longer copy the text from the upload. When I upload the report states :
avrdude: warning: cannot set sck period. please check for usbasp firmware update."
This is repeated twice.
Thank you. You are saving me hours of time and frustration.
I now can upload the Blink sketch. I see activity on the USBasp and the Arduino lights.
I have also burned the bootloader.
I do not see the Blink program running. What do I do to start it?
What is the purpose of the Bootloader.
Should the Bootloader and the Sketch both be on the Arduino together for general usage?
The bootloader allows you to upload sketches to the microcontroller via serial. It's just some code running in a special area of the microcontroller's memory that takes data from the serial line and writes it to flash memory. That code runs every time the microcontroller is reset.
Most Arduino boards have a USB-serial chip so you can just plug the board into your computer with a USB cable, select the virtual com port that was created by the USB-serial chip from the Tools > Port menu, and click the Upload button. It's much less common to do an "Upload using programmer" in the Arduino world. The Arduino Pro does not have a USB-serial chip on it. Instead it has an "FTDI header" that you can plug an external USB-serial adapter breakout board or cable.
The benefit to uploading over serial is that typically in the Arduino world serial prints are used for debug output. So if you already need to have a serial connection to your computer, why not use it for uploads as well as debug communication, etc.?
The downside to uploading over serial is it requires the bootloader. The bootloader takes up some of your flash memory. If you use the USBasp programmer to upload to your Arduino then you can use the full 32 kB of flash memory. Unfortunately the hardware definition for the Pro or Pro Mini reserves the boot section of flash whether you are doing an Upload or an Upload Using Programmer so you would only actually be able to use that memory if you used a different hardware definition, modified the definition, or used AVRDUDE directly from the command line.
What you need to remember is that whenever you do an Upload Using Programmer it erases the bootloader so you can no longer do a standard Upload until you have burned the bootloader again. Also, every time you do a Burn Bootloader it erases the sketch you have uploaded to the board. So the only way (using the Arduino IDE) that you can have the bootloader and the sketch on your microcontroller at the same time is to do a burn bootloader and then an upload via serial.
ArduToys:
I now can upload the Blink sketch. I see activity on the USBasp and the Arduino lights.
I have also burned the bootloader.
I do not see the Blink program running. What do I do to start it?
If you uploaded the Blink sketch and then did a Burn Bootloader you erased the Blink sketch when you did the Burn Bootloader so I suspect that's why you don't see it running. If you only upload the Blink sketch (whether by Upload Using Programmer or Upload) you should see the blink sketch run soon after the upload finishes.
OK. I am now just uploading the Blink sketch. I see activity on the USBasp and on the Arduino PRO. A few seconds after it uploads I see some blinking of the green light on the Arduino board for about a minute. The blinking is not at a one second interval. it is more random. After about a minute all activity stops. It does not seem to actually be running the Blink program.
795a8134c1