Go Down

Topic: Update chinese USBasp firmware, Atmega8A (Read 7446 times) previous topic - next topic

interestingfellow

Jul 30, 2018, 02:10 am Last Edit: Jul 30, 2018, 04:16 pm by interestingfellow
I have acquired two chinese USBasp programmers that were giving me some trouble uploading from IDE so I was going to update the firmware on them as per these instructions, but it isn't working.

When I go to backup the firmware it has on it, Averdude tells me it's the wrong processor.  The USBAsp has an Atmega8A installed on it.

Does anyone know what I need to do to update the firmware? (yes, J2 was connected)

Thanks!

pert

Your picture:

doesn't show that you've bridged JP2. Did you do that?

When I go to backup the firmware it has on it, Averdude tells me it's the wrong processor.
Post the full error, not your description of what you think the error means. Please use code tags (</> button on the toolbar) whenever you post error/warning messages or code.

interestingfellow

I'm sorry, YES!

I used a clip on test lead.

Budvar10

The guide from Roger Clark is correct. Is it actual picture of your USBasp? JP2 have to be closed for programming.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

DrAzzy

#4
Jul 31, 2018, 07:08 am Last Edit: Jul 31, 2018, 07:09 am by DrAzzy
The fact that it's an atmega8A is fine, they have same signature.

What error do you get? "Its not working" is a useless statement. Of course its not working, we know that; you wouldn't be posting if it worked! provide the full text of any and all error messages and what you did to generate them.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

interestingfellow

My nano uses a ch340 (it's a clone).
I flashed it with the arduino isp sketch.
I have a 10uf cap from rst to gnd on the arduino nano.
I have verified connections to the usbasp and installed a proper jumper on P2 (and jumped it).

Upon executing the rest of this tutorial, I get the following results.
The important bit is the "Device signature = 0x000000" at the end but I'm not sure how to "fix" it.


Code: [Select]
c:\Program Files\Arduino\hardware\tools\avr\bin>avrdude -C ../etc/avrdude.conf -
c avrisp -P COM8 -b 19200 -p m8 -v

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "../etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  90
00 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0
 0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0
 0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel AVR ISP
         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.08s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.05s

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


avrdude done.  Thank you.


c:\Program Files\Arduino\hardware\tools\avr\bin>avrdude -C ../etc/avrdude.conf -
c avrisp -P COM8 -b 19200 -p m8 -v

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "../etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  90
00 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           efuse          0     0     0    0 no          0    0      0     0
 0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0
 0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel AVR ISP
         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.05s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.06s

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


avrdude done.  Thank you.


c:\Program Files\Arduino\hardware\tools\avr\bin>avrdude -C ../etc/avrdude.conf -
c avrisp -P COM8 -b 19200 -p m8 -U flash:r:original_firmware.bin:r

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.08s

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


avrdude done.  Thank you.


c:\Program Files\Arduino\hardware\tools\avr\bin>avrdude -C ../etc/avrdude.conf -
c avrisp -P COM8 -b 19200 -p m8 -U flash:w:c:\usbasp.atmega8.2011-05-28.hex
avrdude: invalid file format '\usbasp.atmega8.2011-05-28.hex' in update specifie
r
avrdude: error parsing update operation 'flash:w:c:\usbasp.atmega8.2011-05-28.he
x'

c:\Program Files\Arduino\hardware\tools\avr\bin>

interestingfellow

OMG!
So much easier to just use another known good usbasp, like here

Just jumper p2, plug the target into the programming usbasp, and run the cmd command.
Here is the output I got.

Code: [Select]
c:\Program Files\Arduino\hardware\tools\avr\bin>avrdude -C ../etc/avrdude.conf -
c usbasp -p m8 -U flash:w:usbasp.atmega8.2011-05-28.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9307 (probably m8)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be perform
ed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "usbasp.atmega8.2011-05-28.hex"
avrdude: input file usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: writing flash (4700 bytes):

Writing | ################################################## | 100% 2.65s

avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against usbasp.atmega8.2011-05-28.hex:
avrdude: load data flash data from input file usbasp.atmega8.2011-05-28.hex:
avrdude: input file usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: input file usbasp.atmega8.2011-05-28.hex contains 4700 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.75s

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

avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and
 exited programming mode

avrdude done.  Thank you.


c:\Program Files\Arduino\hardware\tools\avr\bin>

Budvar10

#7
Aug 07, 2018, 08:14 am Last Edit: Aug 07, 2018, 08:16 am by Budvar10
 Post #2 -> JP2. ;)

It works also with the Arduino as ISP, just correct programmer have to be selected.
From your post #5:
Code: [Select]
c:\Program Files\Arduino\hardware\tools\avr\bin>avrdude -C ../etc/avrdude.conf -c avrisp -P COM8 -b 19200 -p m8 -v

Not -c avrisp but -c stk500v1 have to be in the command: Tools -> Programmer -> Arduino as ISP
instead of AVR ISP.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Go Up