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

0 Members and 1 Guest are viewing this topic.

Offline TimCambridge

  • Regular Contributor
  • *
  • Posts: 98
  • Country: gb
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #26 on: December 21, 2016, 03:32:36 am »
Well, I tried all the suggestions, which are kindly appreciated, but the results were the same. I clean up all previous installations, I used the CMDuninstaller program to make sure. I turned off the signature feature on the computer. I downloaded the latest usbasp software and plugged the dongle again, it installed itself as a USBHID with the USBID 03EB/C8B4. Then I force the driver indicated by Heszu, gave me the "driver not signed warning", once finished I can see USBasp on the device manager but when I run arvdude or arvdudegui gives me the same error : could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc.  :'(
Tired now, spend several hours on this and did not move forward. The last thing i'm doing tonight is to power off the computer to make sure that everything is out and see after coming back if I have communication, maybe this dongle is damaged.
As i'm programing using Atmel Studio, maybe I buy one of the devices that work directly with it, maybe.

Thanks everyone for all your help, it is greatly appreciated.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #27 on: December 21, 2016, 04:03:48 am »
installed itself as a USBHID with the USBID 03EB/C8B4.

https://www.sciencetronics.com/greenphotons/?p=938

First result from googling usb pid C8B4, appears to be exactly about the problem you are facing.

~~~
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 #28 on: December 21, 2016, 12:07:53 pm »
Interesting, the only problem is that I do not have other programmer. Yesterday, before I started playing back with this dongle, I try to setup a arduino nano as a programmer. I flashed the isp code using the arduino environment, rigged up the wires from the nano to a atmega328P and I used ardudess to read the chip. At first I thought that is was working, it responded to the read and detect commands, after thinking a while, I disconnected the wires to the subject chip and got the same response, so I guessing ardudess is reporting contact with the onboard 328 from the nano. I have not read the ISP sketch, but i'm guessing is meant to work with the arduino environment and not arvdude. At least I'm dong something wrong which will not be unusual.
If someone has an idea how to flash the program into the dongle please let me know, thanks.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #29 on: December 21, 2016, 01:44:42 pm »
Setup nano as isp, ensurimg wiring is suitable
Turn on verbose  output in arduino ide prefs
Upload (anything) using the nano as isp
Observe the avrdude command line which gets executed to upload via nano as isp
Use similar command execution to flash appropriate firmware  (see previous links)
~~~
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 stj

  • Super Contributor
  • ***
  • Posts: 2528
  • Country: gb
Re: USB-ISP Programmer
« Reply #30 on: December 21, 2016, 02:45:45 pm »
to flash a usbasp from another programmer, you have to set a link/jumper on the asp pcb.

your asp is probably this design.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3538
  • Country: us
Re: USB-ISP Programmer
« Reply #31 on: December 24, 2016, 12:31:20 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.
(bold added to your text)

I too have the NANO solution.  I found it easiest - since I use the Arduino tool set, I don't have the trouble of making something else work.

Since I use it a lot, I have my NANO sitting on a proto-board with headers for ISP programming - 8-pin header for the SOIC clip and a 6 pin ISP Header, plus some dip switches so I can connect/disconnect any ISP lines without having to remove the SOIC clip or 6-pin ISP cable.

When I burn a regular ATMEGA328, I can use an Arduino UNO as the carrier for the 328 and use the 6-pin ISP header to connect my proto board to the UNO.  Alternatively, I can also use a breadboard to host the 328.

When I burn the ATTINY85 or 13, I can use the SOIC clip.  My proto-board also has an additional 8pin header breaking out the target MCU's 8 pin.  I can put an LED or whatever right on the 8-pin breakout and that will connect to the target AtTiny's 8 pins for a quick test.

The great part about using the NANO, I have a dip switch on the proto-board as boot-select.  The NANO uses a modified version of the ISP program on the Arduino IDE - basically the Arduino's ISP program with something extra.  Depending on the boot-select DIP switch setting, it will either run the ISP portion of the code, or run an RS232 bridge that connects NANO's soft-serial to the NANO's USB serial bi-directionally.  The target MCU can read or write to it's RS232 which connects to the NANO's soft-serial.  The NANO in turn passes the soft serial to/from the NANO's own hard serial (USB) which connects to the PC.  Using the RS232 bridge, I can have my AtTiny85 serial.write or serial.read to/from the PC via the NANO.
« Last Edit: December 24, 2016, 12:54:31 am by Rick Law »
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #32 on: December 25, 2016, 01:29:44 am »
Thanks guys for all the help. The other day I ordered a USBASP, with express shipment cost me only $4. I put his on the computer and installed immediately as USBasp, fire up avrdudess connected the leads to a 328p and..... :( some success. I did not get cannot find device, but I got
Quote
"cannot set sck period. please check for usbasp firmware update"
some posts on the internet claimed that this can be ignored, which I did. I clicked the button "Detect", gave two more errors:
Quote
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.
So I added the -F flag and it gives me:
Quote
Unknown signature 000000(retrying)
Then I fire up my scope to see what was happening, at least I'm getting signals out of the programmer. I have attached two shots from the scope. First picture, the red trace shows SCL at 184kHz, the yellow trace is MOSI and it looks that the programmer is trying to talk to the 328. The second shot, I move the red trace to MISO keeping MOSI yellow. The response from the chip is tiny, I don't think the programmer can read that.
I'm looking for the board where I pulled this 328 to see if it damaged, is there other thing that I should be looking for?
 

Offline dan3460Topic starter

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: us
Re: USB-ISP Programmer
« Reply #33 on: December 25, 2016, 01:48:44 am »
Found the board and the 328 is working perfectly.
Ok I think I know what the problem is. This 328p came on a cheap ESR tester that I bought for a few dollars. I think it has been programed not to be reprogramed or read. I remember that I have a bunch of atmegaNanos, wire the USBasp and I can read the nano, which uses the same 328p chip. Is there a way to unlock the chip and in the same question how can you lock the chip once it has been programed?

Thanks guys and sorry to bother with such newbie questions.
 
« Last Edit: December 25, 2016, 02:40:22 am by dan3460 »
 

Offline imidis

  • Frequent Contributor
  • **
  • Posts: 426
  • Country: ca
Re: USB-ISP Programmer
« Reply #34 on: December 25, 2016, 03:35:15 am »
A full chip erase may do it. :)

oh and the sck error I is normall IIRC with that firmware and can just be ignored for real.



Gone for good
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3176
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: USB-ISP Programmer
« Reply #35 on: December 25, 2016, 03:36:03 am »
If a chip has been locked, the only way to unlock it is to erase it, avrdude -e option.

However since you are not able to read the signature, and you are sure you have it connected properly then you probably have a fuse issue, either

  1. the chip has reset or spi programming disabled
  2. the chip is expecting a clock or crystal to be connected
  3. the chip is set to clock very slowly, too slow for the USBAsp auto clocking

In situation 1, you need a high voltage parallel programmer in order to reprogram the fuses.

In situation 2, you can connect a crystal or inject a square wave into XTAL1

In situation 3, either you need an HVPP same as for 1, or reflash the USBasp to use the old non-auto clocking firmware and manually set the bitrate (-B option of avrdude) slowly enough that you can reprogram the fuses appropriately.


~~~
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 #36 on: December 25, 2016, 04:46:23 am »
Hopefully it is number 2. :)

Sorry locking you set the lock bits, but be very careful with it. If it were me, I would lock it from reading, not programming.

I look em up via http://www.engbedded.com/fusecalc/ you cen play with the fuse bits safely, just be sure when you do lock bits on what you are doing.
Gone for good
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3538
  • Country: us
Re: USB-ISP Programmer
« Reply #37 on: December 25, 2016, 07:08:27 am »
There is also another fuse bit that turns off SPI for the 328.  I am not sure how the respond would look like on the scope.

Once off, you can't do anything with the chip using SPI at all.  However, it is recoverable using a something (I forgot the name - I think it is high voltage programming) that basically uses a higher voltage to reprogram the fuse bits.

This high-voltage thing may be another thing to look at.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2528
  • Country: gb
Re: USB-ISP Programmer
« Reply #38 on: December 25, 2016, 11:56:04 am »
the USBasp is an in-circuit programmer,
the avr must have all it's relevent power pins connected and have a clock.
 

Offline Heszu

  • Contributor
  • Posts: 20
  • Country: vu
Re: USB-ISP Programmer
« Reply #39 on: December 25, 2016, 12:14:45 pm »
gave me the "driver not signed warning", once finished I can see USBasp on the device manager but when I run arvdude or arvdudegui gives me the same error : could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc.  :'(

Did You follow exactly the "How To" install unsigned driver to win10 ???
Did You choose "Install anyway" when greeted with the "driver not signed warning",, This is crucial , its a must!!

Those steps must be followed.. when they succeed, You will smile when firing up avrdude....

WBR
Hz
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->