So I'm trying to upload the latest firmware to a chinese USBasp clone I bought on ebay (v2.0).
I uploaded the ArduinoasISP sketch to the MEGA2560
I wired the MEGA to the USBasp as follows:
+5V -> VCC
GND -> GND
Digital50-> MISO
Digital51-> MOSI
Digital52->SCK
PWM10->RST
And when I launch avrdude, I have to click the RESET button in order to stablish connection EVEN IF i put a 10uF capacitor between +5 and RST on the Arduino.
Then, this is the result:
===========================================================
iMac:Desktop alex$ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -pm8 -cavrisp -P/dev/cu.usbmodem1411 -b19200 -D -Uflash:w:/Users/alex/Desktop/USBasp2.hex:i
avrdude: Version 6.3, compiled on Sep 12 2016 at 17:22:25
- Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/*
- Copyright (c) 2007-2014 Joerg Wunsch*
- System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"*
- User configuration file is "/Users/alex/.avrduderc"*
- User configuration file does not exist or is not a regular file, skipping*
- Using Port : /dev/cu.usbmodem1411*
- Using Programmer : avrisp*
- Overriding Baud Rate : 19200*
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 <<<<---- HERE I CLICK RESET ON THE ARDUINO - 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*
- 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 = 0x1e9307 (probably m8)
avrdude: safemode: hfuse reads as D9
avrdude: reading input file "/Users/alex/Desktop/USBasp2.hex"
avrdude: writing flash (4700 bytes):
Writing | ################################################## | 100% 6.67s
avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against /Users/alex/Desktop/USBasp2.hex:
avrdude: load data flash data from input file /Users/alex/Desktop/USBasp2.hex:
avrdude: input file /Users/alex/Desktop/USBasp2.hex contains 4700 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 3.33s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002 - 0xcc != 0xa6*
avrdude: verification error; content mismatch
avrdude: safemode: hfuse reads as D9
avrdude: safemode: Fuses OK (E:FF, H:D9, L:9F)
avrdude done. Thank you.
iMac:Desktop alex$
===========================================================
So what am I doing wrong here?!
Thanks!