USBASP: ISP программатор за 100 рублей

разделы: AVR , Программаторы , дата: 19 августа 2015г.


USBASP программатор

На замену программатору Громова пришел китайский клон USBASP. Культурная плата, без торчащих проводов и работающая сразу от USB порта. Возможно повезло, а возможно я более внимательно выбирал продавцов, но обошлось без траблов описанных на хабре:

При подключении генерируется следующий лог:

474704.050568] usb 6-1: new low-speed USB device number 23 using ohci-pci
[474704.204580] usb 6-1: New USB device found, idVendor=16c0, idProduct=05dc
[474704.204592] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[474704.204600] usb 6-1: Product: USBasp
[474704.204605] usb 6-1: Manufacturer: www.fischl.de

т.е. здесь idVendor=16C0 и idProduct=05DC уже соответствуют оригинальному USBASP. Пробуем запустить avrdude без подключенной микросхемы:

$ avrdude -c usbasp -p m8

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

На скорую руку составляю blink для ATtiny13, компилирую, подключаю микроконтроллер, прошиваю:

avrdude -c usbasp -p t13 -v -v  -U flash:w:./blink.hex:i

avrdude: Version 6.0.1, compiled on Aug 11 2014 at 12:06:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

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

         Using Port                    : usb
         Using Programmer              : usbasp
avrdude: seen device from vendor ->www.fischl.de<-
avrdude: seen product ->USBasp<-
         AVR Part                      : ATtiny13
         Chip Erase delay              : 4000 us
         PAGEL                         : P00
         BS2                           : P00
         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        65     5     4    0 no         64    4      0  4000  4000 0xff 0xff
           flash         65     6    32    0 yes      1024   32     32  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9007
avrdude: safemode: lfuse reads as 6A
avrdude: safemode: hfuse reads as FF
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "./blink.hex"
avrdude: writing flash (68 bytes):

Writing | ################################################## | 100% 0.08s

avrdude: 68 bytes of flash written
avrdude: verifying flash memory against ./blink.hex:
avrdude: load data flash data from input file ./blink.hex:
avrdude: input file ./blink.hex contains 68 bytes
avrdude: reading on-chip flash data:

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

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

avrdude: safemode: lfuse reads as 6A
avrdude: safemode: hfuse reads as FF
avrdude: safemode: Fuses OK (H:FF, E:FF, L:6A)

avrdude done.  Thank you.

Работает.

поделиться: