I needed to update firmware of AVR-USBasp-B (original USBasp's page) which I bought at Akihabara
avrdude: Warning: Found USB device "USBasp" with old VID/PID! Please update firmware of USBasp! avrdude: warning: cannot set sck period. please check for usbasp firmware update.
But I don't have another writer (Arduino runs in another project, so I don't use Arduino-ISP). I tried to use FTDI BitBang AVR-Writer with FT232R.
I needed to apply patches to avrdude for using FTDI BitBang AVR-Writer but the original avrdude-serjtag patches don't support avrdude-5.11.1 (latest version). So I edited the patches and created github repository: laclefyoshi/avrdude-serjtag · GitHub.
After building and installing avrdude (read README.md), I succeeded to update firmware of AVR-USBasp-B.
$ sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext
$ avrdude -C /opt/usr/avrdude/etc/avrdude.conf -c diecimila -P ft0 -p m8 -v
avrdude: Version 5.11.1, compiled on Mar 30 2013 at 17:18:59
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/opt/usr/avrdude/etc/avrdude.conf"
User configuration file is "/Volumes/Macintosh HD/Users/yoshiyasu/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : ft0
Using Programmer : diecimila
avrdude: BitBang OK
avrdude: pin assign miso 3 sck 5 mosi 6 reset 7
avrdude: drain OK
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 : ft245r
Description : FT232R Synchronous BitBang
ft245r: bitclk 230400 -> ft baud 115200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as EF
avrdude: safemode: hfuse reads as D9
avrdude: safemode: lfuse reads as EF
avrdude: safemode: hfuse reads as D9
avrdude: safemode: Fuses OK
avrdude done. Thank you.
$ avrdude -C /opt/usr/avrdude/etc/avrdude.conf -c diecimila -P ft0 -p m8 -U flash:w:usbasp.atmega8.2011-05-28.hex:i
avrdude: BitBang OK
avrdude: pin assign miso 3 sck 5 mosi 6 reset 7
avrdude: drain OK
ft245r: bitclk 230400 -> ft baud 115200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
ft245r: bitclk 230400 -> ft baud 115200
avrdude: reading input file "usbasp.atmega8.2011-05-28.hex"
avrdude: writing flash (4700 bytes):
Writing | ################################################## | 100% 2.25s
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 contains 4700 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.29s
avrdude: verifying ...
avrdude: 4700 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
$ avrdude -C /opt/usr/avrdude/etc/avrdude.conf -c diecimila -P ft0 -p m8 -U hfuse:w:0xC9:m # read http://www.fischl.de/usbasp/Readme.txt
$ sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext
I read Atmega8 with USBasp.
$ avrdude -C /opt/usr/avrdude/etc/avrdude.conf -c usbasp -P ft0 -p m8 -v
avrdude: Version 5.11.1, compiled on Mar 30 2013 at 17:18:59
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/opt/usr/avrdude/etc/avrdude.conf"
User configuration file is "/Volumes/Macintosh HD/Users/yoshiyasu/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : ft0
Using Programmer : usbasp
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 : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as DF
avrdude: safemode: hfuse reads as CA
avrdude: safemode: lfuse reads as DF
avrdude: safemode: hfuse reads as CA
avrdude: safemode: Fuses OK
avrdude done. Thank you.
USBasp is small and good programmer. Recently, sometimes, I want to take time away from Arduino and use AVR microcontrollers.
Thanks.




