Go Down

Topic: USBASP on mac (Read 448 times) previous topic - next topic

markcalaway

Hi everyone,
i'm trying to use the USBASP v2.0 on my mac OSX 10.14.1 to update my ATtiny85.

On the terminal i do not see the port, same as on the Arduino IDE.


So I decide to use this guide to see what my USBASP do: https://goo.gl/SU6bjH

When i run the command: avrdude -C ../etc/avrdude.conf -c avrisp -P /dev/tty.usbmodem14101 -b 19200 -p m8 -v

This is the result:
Code: [Select]
avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "../etc/avrdude.conf"
         User configuration file is "/Users/dave/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem14101
         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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 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  2000 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.02s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

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

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

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

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


avrdude done.  Thank you.



Somebody can help me?

Budvar10

#1
Nov 12, 2018, 01:27 pm Last Edit: Nov 12, 2018, 01:32 pm by Budvar10
Incorrect programmer type. It should be usbasp (-cusbasp).
The link, you've posted, is for usbasp FW upgrade. Please, clarify what are you trying. Are you using Arduino as ISP to see the USBASP?
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

markcalaway

Incorrect programmer type. It should be usbasp (-cusbasp).
The link, you've posted, is for usbasp FW upgrade. Please, clarify what are you trying. Are you using Arduino as ISP to see the USBASP?
I'm trying to re flash the FW on the USBASP. I don't remember what type of FW i flashed on this USBASP.


Are you using Arduino as ISP to see the USBASP?
Yes i use the Arduino with the "Arduino ISP" example on it.


The chip is the ATMEGA8L, i don't understand what i wrong.

BJHenry

I'm confused. Are you using an ATTiny85, an ATMega8?
When using a USBASP with the Arduino IDE you don't need to select a port. Instead you choose the right programmer and use 'Sketch>Upload Using Programmer'.

Budvar10

Arduino as ISP, right?
You have selected incorrect programmer type (according -cavrisp parameter). It is Arduino as ISP and in the command line should be -cstk500v1. However, newer versions have -carduino and in such case, 10uF blocking capacitor between
RESET and GND on programmer board is required.


Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

markcalaway

Sorry I simply wrote wrong.

I need to re flash the FW on my USBASP v2.0 programmer because i do not remember what FW i flashed years ago.

I fallowed this guide https://goo.gl/SU6bjH , but using that command:
avrdude -C ../etc/avrdude.conf -c avrisp -P /dev/tty.usbmodem14101 -b 19200 -p m8 -v

the result is the plot in my first post.

Someone can explain me why that not working?

pert

I guess you didn't bother to read what Budvar10 already told you. Your command line is for the AVRISP programmer but you're not using an AVRISP programmer so of course it's not going to work. You need to change your command line to be suitable for the "Arduino as ISP" programmer.

kprims

I can confirm using -cavrisp will work for writing the Alpha1.06 firmware to a Usbasp using an "Arduino as ISP".
Code: [Select]
avrdude -p m8 -c avrisp  -P/dev/ttyUSB0 -b19200 -v -v  -U flash:w:usbasp-v1.06-alpha-2016-05-18-atmega8.hex:i

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

avrdude: safemode: hfuse reads as C9
avrdude: safemode: Fuses OK (E:FF, H:C9, L:FF)

avrdude done.  Thank you.


On Linux I check the firmware issue this way.
With the Usbasp plugged in.

 lsusb -v -d 16c0:05dc | grep bcdDevice
  bcdDevice            1.05

 $ lsusb -v -d 16c0:05dc | grep bcdDevice
  bcdDevice            1.06



Budvar10

Quote
I can confirm using -cavrisp will work for writing the Alpha1.06 firmware to a Usbasp using an "Arduino as ISP".
If so, try to check your wiring. Response with all FF probably means some short circuit.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Budvar10

After brief look into AVRDUDE, it looks like AVRISP goes with the reset pulse at the beginning. Am I wrong?  I would use STK500v1.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

kprims

Quote
After brief look into AVRDUDE, it looks like AVRISP goes with the reset pulse at the beginning. Am I wrong?  I would use STK500v1.
With my set-up, -carduino is the only one that needs a capacitor between Reset and Gnd. I was just trying to point @markcalaway to the fact he could have some kind of wiring error. I usually use whatever the Arduino Ide is using and was a little surprised the "avrisp" would even work.

Budvar10

@kprims
Yes, I understand. (You already have a karma :) )
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

markcalaway

#12
Nov 15, 2018, 11:48 am Last Edit: Nov 15, 2018, 11:52 am by markcalaway
Thanks for your answers.
I reconnect everything, checked the connections, added a capacitor ( 10uf ), put the jumper (JP2) has i read on the first guide and loaded again the "ArduinoISP" example.

Now with those commands:
Code: [Select]
./avrdude -C ../etc/avrdude.conf -c usbasp -P /dev/tty.usbmodem14101 -b 19200 -p m8 -v
Code: [Select]
./avrdude -C ../etc/avrdude.conf -c avrisp -P /dev/tty.usbmodem14101 -b 19200 -p m8 -v
Code: [Select]
./avrdude -C ../etc/avrdude.conf -c stk500v1 -P /dev/tty.usbmodem14101 -b 19200 -p m8 -v

they gave me in order:
Code: [Select]

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

         System wide configuration file is "../etc/avrdude.conf"
         User configuration file is "/Users/dave/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem14101
         Using Programmer              : usbasp
         Overriding Baud Rate          : 19200
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done.  Thank you.


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

         System wide configuration file is "../etc/avrdude.conf"
         User configuration file is "/Users/dave/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem14101
         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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 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  2000 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.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.


avrdude done.  Thank you.



Code: [Select]

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

         System wide configuration file is "../etc/avrdude.conf"
         User configuration file is "/Users/dave/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem14101
         Using Programmer              : stk500v1
         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  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 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  2000 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 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.


avrdude done.  Thank you.



If i try to run this command:
Code: [Select]
./avrdude -C ../etc/avrdude.conf -c avrisp -P /dev/tty.usbmodem14101 -b 19200 -p m8 -U flash:w:/Users/dave/Downloads/usbasp.2011-05-28/bin/firmware

it gave me:
Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

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

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.


avrdude done.  Thank you.


I searched on the internet to verify my connections, they look good: image

Budvar10

The first command with -c usbasp is wrong. The programmer is Arduino as ISP not USBasp.

All zero response points to problem with connection. Exactly as it wrote:
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
only we do not try -F.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Budvar10

About picture. Not clear view to 5V, GND and capacitor, I hope that USBasp is powered since red LED is on (power?). Other wires looks good. However, JP2 doesn't look reliable. This can cause the problem. Better to solder jumper, also for future use.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Go Up