Author Topic: USB-ISP Programmer  (Read 25434 times)

0 Members and 3 Guests are viewing this topic.

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
USB-ISP Programmer
« on: December 19, 2016, 12:59:28 pm »
I have been prototyping with arduino for a couple of years, I'm working on a board where I want to program the atmega328 directly so I can use the portion of the memory used by the boot loader. So I bought a cheap Chinese http://www.ebay.com/itm/232157187265?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT, maybe that is the problem already. :palm:

In any case, after several hours fiddling with this thing, downloaded several drivers that should work, I threw it across the room.

Did not know exactly what they meant with this 
Quote
Feature:
 1, no need to install drivers. Plugged into a computer USB port, it will prompt the discovery of Engineering Input Devices
, but I assumed that it would install automatically.

The best I could do, with one of the drivers from the internet was to create a entry on the devices list that shows USBHID, for human interface device, but I couldn't make arvdude to find the port.

Is anyone dealt with something like this?
 

Online stj

  • Super Contributor
  • ***
  • Posts: 2528
  • Country: gb
Re: USB-ISP Programmer
« Reply #1 on: December 19, 2016, 01:26:05 pm »
that's a USBasp - IMO the best programmer around.
http://www.fischl.de/usbasp/

you need 1 - 3 things.

1: a LibUSB driver if you use windows.   http://zadig.akeo.ie/

2: the latest AVRdude   http://download.savannah.gnu.org/releases/avrdude/

3: optional GUI if you dont like the commandline   http://blog.zakkemble.co.uk/avrdudess-a-gui-for-avrdude/


most importantly, dont let some fool talk you into overwriting the firmware in the programmer.
the chinese have newer firmware than is openly available with auto speed negotiation.
so if you see errors about "cant set fsck" or something like that - ignore it.

« Last Edit: December 19, 2016, 01:28:16 pm by stj »
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #2 on: December 19, 2016, 02:01:49 pm »
As stj says, on Windows you need libusb installed, see

http://www.fischl.de/usbasp/

http://rayshobby.net/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/

One of my clients who was having trouble with Windows 7 indicated sometime after he got it working that he "think it was the 23371 USBASP Driver which ended up working on windows 7" and by that I think he must have meant http://www.winddeal.net/image/tools/23371%20USBASP%20Driver.zip

As stj also says, the chinese USBAsp devices have auto-speed firmware, which will produce the warning about not being able to set SCK.  Unless you need to program a really slow clocking AVR (less than 1 Mhz from memory) ignore the error, autospeed is better especially if using the Arduino IDE because it has no way to set the speed itself.

If you do need to set the speed (manually using avrdude), either the original fischl firmware can be used (sacrificing auto speed), or there is a newer firmware fork which supports setting SCK and can still do auto speed, I've not tried it myself though https://github.com/bperrybap/usbasp/tree/1.06-alpha/bin (note 1.06-alpha branch!)
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #3 on: December 19, 2016, 02:43:41 pm »
As stj says, on Windows you need libusb installed, see

http://www.fischl.de/usbasp/

http://rayshobby.net/dead-simple-driver-installation-for-usbasp-and-usbtiny-on-windows/

One of my clients who was having trouble with Windows 7 indicated sometime after he got it working that he "think it was the 23371 USBASP Driver which ended up working on windows 7" and by that I think he must have meant http://www.winddeal.net/image/tools/23371%20USBASP%20Driver.zip

As stj also says, the chinese USBAsp devices have auto-speed firmware, which will produce the warning about not being able to set SCK.  Unless you need to program a really slow clocking AVR (less than 1 Mhz from memory) ignore the error, autospeed is better especially if using the Arduino IDE because it has no way to set the speed itself.

If you do need to set the speed (manually using avrdude), either the original fischl firmware can be used (sacrificing auto speed), or there is a newer firmware fork which supports setting SCK and can still do auto speed, I've not tried it myself though https://github.com/bperrybap/usbasp/tree/1.06-alpha/bin (note 1.06-alpha branch!)

Thanks, I yesterday I used ALL the what you pointed at.
Zadig - Once run, it had a empty list of hardware, so I click options, list devices, then by plugging and unplugging the dongle discovered that the new device was called USDHID, I installed the driver 4 times using the 4 options shown by Zadig.

I do have the last version of avrdude and also used the arvdudess.

avrdude would not find the port.
 

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: USB-ISP Programmer
« Reply #4 on: December 19, 2016, 04:01:30 pm »
What do you see with the Microsoft USBView utility? It's on the FTDI site: http://www.ftdichip.com/Support/Utilities/usbview.zip
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #5 on: December 19, 2016, 05:10:25 pm »
will look when i'm back home. thanks
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #6 on: December 19, 2016, 09:54:26 pm »
This is what it shows, device loc17 the one I highlighted is the one that shows up when I plug the dongle in. Is that address 0x03 the one that I have to use? if so how do I give that to avrdude?

 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #7 on: December 19, 2016, 10:33:19 pm »
What version of Windows are you using?

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #8 on: December 19, 2016, 11:15:36 pm »
Windows 10
 

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: USB-ISP Programmer
« Reply #9 on: December 19, 2016, 11:25:26 pm »
I had a bit of trouble getting mine going, ended up using the libusbk driver. Had to fidget with it a bit though.
Gone for good
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #10 on: December 19, 2016, 11:47:52 pm »
Unfortunatly I don't have Windows 10 available to try myself.

A bit of googling indicated that most people could use the zadig stuff.  Note that it's 64bit only I think, I can't imagine you'd be using 32bit though anyway.

A bit more googling found this maybe:
https://www.protostack.com/blog/2015/01/usbasp-windows-driver-version-3-0-7/

The github link I posted earlier has this:
https://github.com/bperrybap/usbasp/tree/1.06-alpha/bin/win-driver/libusb_1.2.4.0

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: USB-ISP Programmer
« Reply #11 on: December 19, 2016, 11:57:02 pm »
Dunno if this will help, but it's my windows 10 using usbasp

Gone for good
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #12 on: December 20, 2016, 12:38:04 am »
Imidis, what command you use in avrdude?
 

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: USB-ISP Programmer
« Reply #13 on: December 20, 2016, 12:45:34 am »
I use avrdudess GUI selecting usbasp atmega328p
 

to flash?

-c usbasp -p m328p -B 0.5 -U flash:w:"C:\Users\TTE\Desktop\file.hex":a

This is how I hook it up on the breadboard with the USBAsp output cable. Of course oscillator config varies.

« Last Edit: December 20, 2016, 01:34:50 am by imidis »
Gone for good
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #14 on: December 20, 2016, 01:45:34 am »
yep, no luck.

avrdude cannot see the device on the usb port. I pull an old nano from a project that I have, loaded the Arduino isp schetch and I was able to talk to it on arvdudess, but the nano creates a com port for the communication.
I have to return the nano back to the project, but maybe the solution is to buy another nano. completely frustrated.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #15 on: December 20, 2016, 03:39:35 am »
avrdude cannot see the device on the usb port. I pull an old nano from a project that I have, loaded the Arduino isp schetch and I was able to talk to it on arvdudess, but the nano creates a com port for the communication.

It's possible that your USBasp (I've never used the ones with an enclosure) has some different firmware on it.

You could use the Nano to flash new firmware on the USBasp.

One assumes that you did ask the seller about Windows 10 problems, and that they didn't know jack as is to be expected (but very rarely you might get one who does know what they are selling).
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Online stj

  • Super Contributor
  • ***
  • Posts: 2528
  • Country: gb
Re: USB-ISP Programmer
« Reply #16 on: December 20, 2016, 06:50:18 am »
try a Linux live disk or a Linux box - it should auto-detect it as USBasp

99% it's your shit o.s. causing the problems.
upgrade to 7 or Linux.
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #17 on: December 20, 2016, 01:00:24 pm »
avrdude cannot see the device on the usb port. I pull an old nano from a project that I have, loaded the Arduino isp schetch and I was able to talk to it on arvdudess, but the nano creates a com port for the communication.

It's possible that your USBasp (I've never used the ones with an enclosure) has some different firmware on it.

You could use the Nano to flash new firmware on the USBasp.

One assumes that you did ask the seller about Windows 10 problems, and that they didn't know jack as is to be expected (but very rarely you might get one who does know what they are selling).
Yes I did asked the seller by I have gotten no answers and I probably don't expect any, I only pay $4 including freight so I don't think they have a "technical" department.
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #18 on: December 20, 2016, 01:02:36 pm »
try a Linux live disk or a Linux box - it should auto-detect it as USBasp

99% it's your shit o.s. causing the problems.
upgrade to 7 or Linux.
You are probably right but I do not have another box to setup Linux.
 

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: USB-ISP Programmer
« Reply #19 on: December 20, 2016, 03:32:52 pm »
From USBview it seems that the VID/PID are 03EB/C8B4. If possible you should check that these are the values you expect.

Next I would unplug the programmer and run FTDI's CDM Uninstaller (http://www.ftdichip.com/Support/Utilities.htm#CDMUninstaller) That will remove any old drivers lurking in unexpected corners of your system.

Then you are ready for a clean install, however that is recommended in the "documentation."

--
Tim
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #20 on: December 20, 2016, 04:22:41 pm »
Got some sort of communication from the vendor, it seems to have been translated using Google translate, doesn't make too much sense. For what I can understand they are sending me to a website to download the driver but the whole thing is in Chinese.

Sorry I'm an old fart that has recently gotten into microcontrollers and some times my brain does not work in the way that is used to do. :o
Tim, what do you mean with "the values that I expect"? How do I check those value?

I will try to do an uninstall and pay extra attention on the install process, the vendor says that you do not need drivers, it should install by itself.
 

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: USB-ISP Programmer
« Reply #21 on: December 20, 2016, 07:31:32 pm »
I found this on the ebay listing

Quote

Almost like the original - lets make it original

When i first got this item, i was really bummed by the fact i have to use verry specific program (). AVRDude or other tools wont recognize it. But f you crack it open you can clearly see that i has almost the same circuitry. The only difference is d- from usb is connected to PD3...so we could put the original firmware in and we should be fine right ? No, its not working now, after few hours i found out that in the original firmware the whole portD is set as output, but only pins PD0 and PD1 should be output set to ground, so after changing that lets and uploading the edited firmware it works, avrdude can use it like UsbAsp.
So if you can:
1) Download original firmware (google UsbAsp)
2) edit in main.c the portD init to only PD0 adn PD1 set to output (ground) (Atmel studio is nice)
3) compile for given processor (original is atmega8 this was atmega88), and set fuses as written in firmware readme,
4) crack open this programmer (just pull down on the alluminum casing, bridge the two pins marked UP for self programming

5) connect other working ISP programmer (or arduino as ISP, etc.) and upload your firmware.
6) debridge the pins UP

Then you have this very nice verry usable very fast and quite cheap ISP programmer.

After doing this i found that i was not the first one who did this, but i had other processor and little bit different circuit inside (PD1 and PD0).

Verified purchase: No

So it looks like they messed with the original usbasp and it doesn't work with avrdude.

You have a link to the site? I can see if I can find a download. Would have been nice if they made it as a normal usbasp.  |O
Gone for good
 

Offline Heszu

  • Contributor
  • Posts: 20
  • Country: vu
Re: USB-ISP Programmer
« Reply #22 on: December 20, 2016, 07:33:38 pm »
Got some sort of communication from the vendor, it seems to have been translated using Google translate, doesn't make too much sense. For what I can understand they are sending me to a website to download the driver but the whole thing is in Chinese.

Sorry I'm an old fart that has recently gotten into microcontrollers and some times my brain does not work in the way that is used to do. :o
Tim, what do you mean with "the values that I expect"? How do I check those value?

I will try to do an uninstall and pay extra attention on the install process, the vendor says that you do not need drivers, it should install by itself.

Hi there.

Yes vendor say,s that one doesn't need driver, system recognize UsbAsp..  Well,
Yes, it does recognize as usbasp, BUT cannot find driver :) !

I just tested, I have an open version usbasp and have installed win10 on one laptop just for testing...

I took about 10 min all to get usbasp up'nd'running. (on an absolutely clean win10)
(So do as earlier in the thread is mentioned, remove all old things)

Start here:
https://netmaxtech.com/how-to-make/install-usbasp-driver-windows-8-and-windows
Follow exactly.. and install driver ,as described.

Next:
Then I downloaded :
https://sourceforge.net/projects/avrdudegui/

Fired up the GUI, selected programmer usbasp, inserted an old atmega chip clicked Read Flash,,
with a smile on my face, it worked just great !!

Cheers !

AAh,, You have found a solution, whilst I was typing...   
« Last Edit: December 20, 2016, 07:38:12 pm by Heszu »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 2316
  • Country: dk
Re: USB-ISP Programmer
« Reply #23 on: December 20, 2016, 08:10:41 pm »
 

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
Re: USB-ISP Programmer
« Reply #24 on: December 20, 2016, 09:09:23 pm »
Ah. Reading up the thread a little more, those who know point out that the drivers that you need are the libusb ones, not the FTDI drivers. It can't hurt to remove any lurking FTDI drivers and I would do that if you have the CDM Uninstaller tool. Remove FTDI drivers for your VID/PID: 03EB/C8B4

Then you need the Zadig installer which will put the libusb drivers onto your system. You can run Zadig with your programmer plugged in. Make sure the "USB ID" is 03EB/C8B4. Zadig offers several implementations of libusb (click the list to the right of the green arrow), the experts seem to recommend the libusb-win32 version. Then you should be good to go.

--
Tim
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->