Go Down

Topic: usbasp windows 10 no com port? (Read 47613 times) previous topic - next topic

ArduToys

I am new to the Arduino environment. I can not get Arduino 1.8.5 to talk to my Arduino PRO through a USBasp device. I have defined my board as a "Arduino PRO or PRO mini", my processor as "ATmega328P
(5V, 16MHZ)" , my programmer as "USBasp". I have tried two USBasp programmers, one is an old LC Technology V2.0, the other is a new "Atomic Market USBasp AVR Programming Device". They both seem to NOT work the same way. I am using the 10 pin to 6 pin converter plugged into a 6 pin header on the Arduino Pro. When I compile and try to download I get the following messages:
----------
Arduino: 1.8.5 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

Sketch uses 928 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\\.\COM1": The system cannot find the file specified.


Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
----------
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."

The Arduino PRO does light up when everything is plugged in.

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?

Any assistance would be greatly appriciated.

pert

and try to download
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.

The Device Manager reports the USBasp as a "libusb-win32 devices" "USBasp"
Device Type libusb-win32 devices
That may cause a completely unrelated problem but try the Upload using programmer first and then we'll deal with the driver if necessary.

ArduToys

Thanks for the quick responce. I was not aware of the shift key usage.
I recompiled and used the shift key to upload.
Here is the new response:
----------

Arduino: 1.8.5 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

Sketch uses 928 bytes (3%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: Warning: cannot query manufacturer for device: No such file or directory
avrdude: Warning: cannot query product for device: Input/output error
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
---------
Seems to be a device definition problem?


pert

That's progress!

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:
http://zadig.akeo.ie/
If you end up needing specific instruction for doing that let me know and I'll provide them.

ArduToys

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.

Any ideas on this one?


pert

That's completely normal and doesn't indicate any problem. Please ignore it.

ArduToys

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?

Is there someplace I can get this type of information.
I thought I was following the introduction But I did not see this type of info.
I may have gotten sidetracked due to my USBasp problems.

pert

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.

Another thing to note is that when you do a Burn Bootloader it also sets the fuses according to the settings in the hardware definition for the currently selected board.

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.

ArduToys

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.

Go Up