Simple, reliable alternative to USBASP programmer - Arduino as ISP

Arduino projects on the go
albertthedragon
Posts: 9
Joined: 24 Feb 2021, 07:32

Re: Simple, reliable alternative to USBASP programmer - Arduino as ISP

Post by albertthedragon »

Martin and Mike.
Thanks for the replies but nothing changes
I have reloaded the blink program several times with differing delays and that works fine.
The programmer file (ArduinoISP_Nano_D2.ino) also loads without a problem ( but only with ATmega328 old bootloader) and the reset line is wired into D2. I have now checked and rechecked the inconnect wiring about 4 x and with an independant checker.

However it still fails 100% of the time, with the same batch of errors listed above.

Its also rather frustrating that I have Windoze on 3 PCs, but the ArduinoIDE will only program on 1, the other 2 suffer from Port not found problems that none of the dozen or so help suggestions work for !! Grrrr.

I have yet to find my USBASP programming harness to try, but I have always found that patchy with a lot of whining about drivers.

Any other suggestions?
Thanks and rgds
Barry
albertthedragon
Posts: 9
Joined: 24 Feb 2021, 07:32

Re: Simple, reliable alternative to USBASP programmer - Arduino as ISP

Post by albertthedragon »

Aha, success, but not with the Arduino as ISP!

I found one of my USBasps, I had 2 lurking about. It works perfectly1

So I guess I'm in the 1% where Arduino as ISP fails. I'd still like a solution to get it working if possible though.

Rgds
Barry
albertthedragon
Posts: 9
Joined: 24 Feb 2021, 07:32

Re: Simple, reliable alternative to USBASP programmer - Arduino as ISP

Post by albertthedragon »

This whole Arduino thing is becoming nuts.

In my last post I said a USBasp programmer worked fine. It did, just once!! Then it has never worked since, It seems to be a port problem. I have spent some hours fooling about with zadig, drivers from the FTDI site and tried many of the fixes proclaimed to work on various websites and forums. With 2 different USBasp programmers and 2 different cables.

Loading the basic blink into the same Arduino works well, with varying blink rates to verify a new successful load. Then, loading the “Arduino as ISP” sketch (ArduinoISP_Nano_D2.ino) into the same Arduino seems to work, at least no errors are generated. And I can reload blink sketches back into it as well.

But then, trying to use it as a programmer is a constant fail. (the error report is below) I believe I have the settings correct, The selected programmer is “Arduino as ISP” and I use “Upload using programmer” I have checked the 6 interconnects (via JR and Futaba leads) several times, and the reset line is connected to D2.

I would love to be part of the 99% that experience success with the Arduino as ISP
Any more ideas on the fault and how to fix this?

Rgds, Barry

"Sketch uses 4354 bytes (14%) of program storage space. Maximum is 30720 bytes.
Global variables use 482 bytes (23%) of dynamic memory, leaving 1566 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x78
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x78
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x78
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x78
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x78
Failed programming: uploading error: exit status 1"
albertthedragon
Posts: 9
Joined: 24 Feb 2021, 07:32

Re: Simple, reliable alternative to USBASP programmer - Arduino as ISP

Post by albertthedragon »

Anybody got any ideas on this?

Barry
Martin
Posts: 784
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Simple, reliable alternative to USBASP programmer - Arduino as ISP

Post by Martin »

What happens when you try 'upload using programmer' when the target board isn't connected to the programming board? I think you should get a different error message (like 'target not responding') when the Arduino as ISP is talking to the ISP, but not connected to the target board.

Make sure that the Serial Terminal part of the Arduino IDE is closed when attempting an upload.

Do you have a different Arduino you could try to use as the programmer?
User avatar
Flynn
Posts: 94
Joined: 17 Feb 2018, 14:48

Re: Simple, reliable alternative to USBASP programmer - Arduino as ISP

Post by Flynn »

Following on from Martins post, the results Albert is getting is same as I can get if the uno hasn't been programmed with the 'arduinoasISP' sketch. Here, the Uno has the blink sketch installed and I am trying to upload the 7channelencoder sketch using upload by programmer with the programmer set as arduino as ISP -

Code: Select all

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

         System wide configuration file is "C:.....................ckages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03

avrdude done.  Thank you.

Failed programming: uploading error: exit status 1
The programmer is not responding because it has not been flashed into the Uno!

If the uno has been correctly programmed with the ArduinoasISP sketch and no 'target' device connected I get this -

Code: Select all

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

         System wide configuration file is..........diy_attiny\hardware\avr\2023.4.19-gcc7.3/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny13
         Chip Erase delay              : 4000 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         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     5     4    0 no         64    4      0  4000  4000 0xff 0xff
           flash         65     6    32    0 yes      1024   32     32  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  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

This shows the programmer is working but cannot talk to the target device. If I then fit the target device (an ATTINY13 in this example) I get this -

Code: Select all

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

         System wide configuration file is .............es\diy_attiny\hardware\avr\2023.4.19-gcc7.3/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATtiny13
         Chip Erase delay              : 4000 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         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     5     4    0 no         64    4      0  4000  4000 0xff 0xff
           flash         65     6    32    0 yes      1024   32     32  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  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9007 (probably t13)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\g7ocm\AppData\Local\arduino\sketches\6386BECBF8172B613CCE089C3EA59973/ATTiny13.ino.hex"
avrdude: writing flash (502 bytes):

Writing | ################################################## | 100% 1.03s

avrdude: 502 bytes of flash written
avrdude: verifying flash memory against C:\Users\g7ocm\AppData\Local\arduino\sketches\6386BECBF8172B613CCE089C3EA59973/ATTiny13.ino.hex:
avrdude: load data flash data from input file C:\Users\g7ocm\AppData\Local\arduino\sketches\6386BECBF8172B613CCE089C3EA59973/ATTiny13.ino.hex:
avrdude: input file C:\Users\g7ocm\AppData\Local\arduino\sketches\6386BECBF8172B613CCE089C3EA59973/ATTiny13.ino.hex contains 502 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.42s

avrdude: verifying ...
avrdude: 502 bytes of flash verified

avrdude done.  Thank you.
So it looks to me Albert as you are not getting the ArduinoasISP firmware installed in your UNO. I suggest you remove all connections except the USB lead to your Uno, upload the blink sketch to your Uno and verify the 'L' LED on the uno is flashing, then select the ArduinoISP sketch from Files/Examples/11.ArduinoISP and upload that. The 'L' led should now be on all the time. If you now attempt to upload any sketch using 'Upload using programmer' you should get the invalid signature response -

Code: Select all

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
Once at this stage you can connect your target device and it *should* work.
You only ever need two tools....WD40 and duct tape.
If it doesn't move when it should use the WD40 and if it moves and it shouldn't use the tape.
Post Reply