chakokuのブログ(rev4)

テック・コミック・DTM・・・ごくまれにチャリ

USBasp + avrdudeを使って焼いてみる

先日作成したUSBaspを使って、tiny2313を焼いてみる。tiny2313は正常に焼けた。

以下はその時のavrdudeの出力


$ make flash
/usr/local/bin/avrdude -c usbasp -p attiny2313 -U flash:w:main.hex:i
found 4 busses

avrdude.exe: AVR device initialized and ready to accept instructions

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

avrdude.exe: Device signature = 0x1e910a
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be perfo
rmed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "main.hex"
avrdude.exe: writing flash (106 bytes):

Writing | ################################################## | 100% 0.05s

avrdude.exe: 106 bytes of flash written
avrdude.exe: verifying flash memory against main.hex:
avrdude.exe: load data flash data from input file main.hex:
avrdude.exe: input file main.hex contains 106 bytes
avrdude.exe: reading on-chip flash data:

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

avrdude.exe: verifying ...
avrdude.exe: 106 bytes of flash verified
avrdude.exe: safemode: Fuses OK
avrdude.exe done. Thank you.

なお、tiny45ではエラーが出て焼くのは失敗している。
以下はターゲット(tiny45のチップ)とUSBasp間で、接続確認だけやらせた時のメッセージ。ターゲット異常なので、tiny45が正常に応答していないせいと思われる。これはt45に入れるクロックとして、オッシレータを使わず、セラロックを使っているせいか??


$ /usr/local/bin/avrdude.exe -c usbasp -p t45
found 4 busses

avrdude.exe: error: programm enable: target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude.exe done. Thank you.