33 Comments

  1. Guenther Zoeppel

    I build myself an USBASP programmer,
    everything is working fine with it and this tutorial.
    But now I have to program some AT89LP4052,
    which I can´t find in the MCU list of AVRDUDE SS.
    Is there a new file avrdude.conf ,
    where this processor is available ?
    If so, could you provide a link for it ?
    Is it necessary to modify some hardware,
    concerning the ISP connector
    for the above mentioned processor,
    because of the new SS-Bit ?

    Reply

  2. Thank you so much. I am using AVR 8,16,32 from long time. But using isp programmer. This tutorial was much helpful. I used it to program atmega644p

    Reply
  3. Patrick

    Hi,
    Windows just did a major update (Windows 10) Since then the exe crash instantly at start.
    (0xc000007b)
    We have 64bits and use version 6.3 of avrdude.exe, we tried tos et compatibility to windos 8 or XP but nothing helps
    Thanks

    Reply
  4. rizwan

    how to set sck at 1Mhz

    Reply
  5. indu

    avrdude.exe: set SCK frequency to 1500000 Hz
    avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
    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.
    this error show. how to sort out this error… plz give advice….

    Reply
    • Elecrom

      Hi,

      It is a warning and you can ignore that. Important thing to look for is the “error”. Since it says ‘target doesn’t answer’ there are following possibilities:
      1) Connection issues with the device. Check all the connections.
      2) Target AVR chip is not getting powered up or does not have crystal connected to it. Check power supplies and crystal.
      3) Your target chip is brand new with internal 1MHz oscillator, in which case your USBasp will not be able to program this device if your USBasp uses SCK frequency higher than 1MHz. So, you will need to get another USBasp which supports setting of SCK frequency or upgrade firmware of your current one (http://www.rogerclark.net/updating-firmware-on-usbasp-bought-from-ebay/).

      Hope it helps.

      Reply
  6. Dipto Das.

    Thank you for the post.As I am a begginer. So please help me for getting started. what are the components to construct a circuit using uC?

    Reply

  7. Cool blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple tweeks would really make my blog stand out.
    Please let me know where you got your theme. With thanks

    Reply
    • Elecrom

      It is readily available free wordpress theme.

      Reply
  8. ravi kumar

    trying to connect to device……
    averdude: error:programm enable:target doesn’t answer.1
    averdude:initialization failed,rc=-1
    double check connection and try again ,or use -F to override this check

    avrdude done .thnku
    this is showing when i m trying to programme my microcontroller ..what is the problem ..plzzz help ….

    Reply
    • Elecrom

      Possible reasons – 1) Target’s power supply is off / 2) Target is running on internal slow speed oscillator, in which case you will have to slow down the programming speed. / 3) Target does not have crystal / 4) Connection issues.

      Reply
  9. hitech

    Hi i am new to this world i am not able to program my atmega 32 for lcd programs please help this is the error

    Linking: main.elf
    avr-gcc -mmcu=atmega32 -I. -gdwarf-2 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o -std=gnu99 -MMD -MP -MF .dep/main.elf.d main.o –output main.elf -Wl,-Map=main.map,–cref -lm
    main.o: In function `main’:
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:12: undefined reference to `LCDInit’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:15: undefined reference to `LCDByte’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:18: undefined reference to `LCDWriteString’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:21: undefined reference to `LCDGotoXY’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:21: undefined reference to `LCDWriteString’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:26: undefined reference to `LCDGotoXY’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:26: undefined reference to `LCDWriteInt’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:27: undefined reference to `LCDGotoXY’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:27: undefined reference to `LCDWriteString’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:36: undefined reference to `LCDByte’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:40: undefined reference to `LCDWriteString’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:41: undefined reference to `LCDGotoXY’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:41: undefined reference to `LCDWriteString’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:47: undefined reference to `LCDByte’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:48: undefined reference to `LCDWriteString’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:49: undefined reference to `LCDGotoXY’
    C:UsersAMIRDesktopprojectslcd interfacing/main.c:49: undefined reference to `LCDWriteString’
    make.exe: *** [main.elf] Error 1

    > Process Exit Code: 2
    > Time Taken: 00:01

    Reply
    • Elecrom

      Correct place to post this would be AVRfreaks forum. 🙂

      Reply
  10. ganesh

    Hello sir,

    iam using, atmega16l microcontroller and usbasp programmer
    it give this error
    ‘avrdude’ is not recognized as an internal or external command, operable program or a batch file.
    plz help me out.

    Reply
    • Elecrom

      It means WinAVR is not installed or got corrupted. Reinstall it to fix this error.

      Reply
      • ganesh

        i am using code vision AVR

        Reply
  11. Saurabh

    Hi all,
    I am trying to make USBasp since last 2 month but its not working. Its showing “Unknown device”. I have no issues regarding board and soldering. Everything I got from http://www.fischl.de/usbasp/, downloaded “usbasp.2011-05-28”, but its not working. Please help me regarding this issue. I am really got pissed off now.

    Reply
    • Elecrom

      Have you programmed your mega8 AVR with the firmware and correct fuse settings ?

      Reply
    • sahid

      Hello,

      1. You shold have a correctly worked “programmer”, also a way to flash a chip. If you dont have such one, you should start on the other point. At example
      http://www.pitsch.de/stuff/mmc2iec/avrisp.htm, which works 100% with a LPT-Printer Port (on an old PCs available only) and PonyProg-software (Windows) http://www.lancos.com/prog.html

      2. If you have a programmer, you must be sure, you have installed all the needed software on your PC correctly for using existing “first” programmer

      3. @Saurabh: do you have a functioning programmer? If not, start with 1.

      The http://www.fischl.de/usbasp/ helps you to build a “second” better programmer if you have an another also “first” primitive programmer.

      I suppose, you don’t have any programmer and you try to build first one. Starts also with “1” and an old PC.

      I hope I could help you…

      Reply
  12. Mayank Kr Tyagi

    Hello sir,

    iam using, atmega16 microcontroller and usbasp programmer

    i am not able to connect my controller to pc.

    please guide me for the solution Email : [email protected]
    i will be very thankful 2 u.

    thanks

    Reply
  13. curious

    I am using Sina Prog to program my ATmega169PV using USBasp. However, I was trying to unprogram the ‘divide clock by 8’ fuse bit and I don’t know what happened after doing that but the controller does not get detected by Sina Prog any more.
    I am getting this error:

    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.

    I know that the USBasp programmer is working because I tried programming another microcontroller with it and it worked.

    What should I do?

    Reply

  14. sir,
    I am using atmega8l microcontroller and usbasp programmer
    while programming, it says device not responding.
    please help.

    Reply

  15. Venkatesh

    I really appreciate your invaluable efforts to guide newbies like me

    Reply
  16. Manu

    Hai Sir,
    During burning program into Chip using extreme burner the fuse bits are set wrong by me & burned.Now i cant able to use my chip so can u please able to tel me a way to recover my chip……. please…

    Reply

  17. Nice post dude,
    I’ve tried to follow the “readme” file while flashing the USBasp & got this error messages :

    $ sudo avrdude -p m8 -c usbasp -P usb -U flash:w:main.hex

    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.

    based on ur post above, this error occur if there’s some problems with the connection between uC & USBasp.
    In this case, i just test the USBasp itself with no uController connected.

    Any advice for this?

    Thx a million,
    Aston

    Reply
    • Elecrom

      That is perfectly expected. When you don’t connect your ATmega8 to the USBasp, you will get this message.

      “avrdude: error: programm enable: target doesn’t answer. ” This indicates that, USBasp hardware is not able to detect specified uC attached to it. So you have to connect your uC and then use the above mentioned command to burn the uC.

      Reply

  18. karan

    Use sinaprog got more options of microcontrollers

    Reply

  19. Hello,
    🙂

    I have recently written a GUI Software for driving USBasp compatible USB Programmers. It is much easier to use than the avrdude or avrdude-gui.

    You can download it free of cost from here

    http://extremeelectronics.co.in/avr-tutorials/gui-software-for-usbasp-based-usb-avr-programmers/

    Reply
    • Mayank Gulati

      it doesn’t have option for atmega 328 in win8 then what should i do now?

      and i need to use external oscillator and capacitor for that …

      Reply

Leave a Reply to ganesh Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.