I am attempting to upload the Arduino bootloader and a program to an ATMEGA328P-AU with an AVR programmer. I have done this before using the Arduino UNO board and and the 28 pin DIP version of the ATMEGA328P, however I'm running into issues using the TQFP version.

Using a TQFP adapter socket, I have simply used jumpers and a breadboard to connect the necessary pins to AVR programmer. For convenience, I've provided the schematics of both the AVR programmer connector and the IC:

AVR Programmer Schematic


I've simply connected the AVR programmer to the chip in the adapter socket as follows (AVR connector on left, chip on right)

1 (MOSI) - Pin 15

2 (VCC) - Pins 4, 6, 18

5 (RST) - Pin 29

6 (GND) - Pins 3, 5, 21

7 (SCK) - Pin 17

9 (MISO) - Pin 16

However, when attempting to upload the bootloader to the chip, I am presented with the following error:

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 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        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           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
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

Error while burning bootloader.

Clearly I'm doing something incorrectly, and I wouldn't doubt if it was because it's not as simple as hooking the AVR programmer directly up to the chip to program it.

Any help would be appreciated.

Thank you.


closed as off-topic by Chris Stratton, PeterJ, Sparky256, mkeith, Dave Tweed Jan 10 '18 at 20:20

  • This question does not appear to be about electronics design within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ Is there a pullup resistor on SPI CS? When I did this last year I ran into an issue where CS was undriven during reset, and an attached SPI slave device interfered with the ICD firmware loading process. \$\endgroup\$ – MarkU Aug 26 '17 at 1:38
  • 2
    \$\begingroup\$ Can you edit the question to include the exact command-line arguments given to avrdude? It looks like the log text says 'programmer operation not supported', could be a symptom of bad cmd line args. \$\endgroup\$ – MarkU Aug 26 '17 at 1:40
  • 1
    \$\begingroup\$ Have you applied power to the circuit? The AVR programmer will not supply power. \$\endgroup\$ – Tom Carpenter Aug 26 '17 at 8:35
  • \$\begingroup\$ @TomCarpenter, the programmer does provide power. There's a switch on the USBtiny to enable/disable power. It's worth checking its in the correct position, though. \$\endgroup\$ – uhours Aug 26 '17 at 12:39
  • 4
    \$\begingroup\$ I'm voting to close this question as off-topic because it has been abandoned for half a year in unanswerable state. \$\endgroup\$ – Chris Stratton Jan 6 '18 at 16:12

Well first of all, check the wiring. Check that the ISP header connects to the pins that it ought to, and check that you have the chip oriented correctly in the socket The USBtiny has a switch to power the target, so make sure that's in the correct position. If all that is correct, there are a couple other things that could cause that error:

  1. The reset pin lacks the normal ESD protection, and so is fairly easy to fry. Ground yourself and use an ESD mat.

  2. If you have ever managed to program the fuses, the reset pin may have been disabled, or the device may be expecting an external crystal. If the reset pin has been disabled, you'll need a special high voltage (12V) programmer to recover it.

  • \$\begingroup\$ Crystal requirement comes when booting through the bootloader i.e. when you are trying to program via UART. When programming through SPI, the chip accepts the program even if the fuses are set to accept clock signal from external clock. \$\endgroup\$ – Whiskeyjack Aug 26 '17 at 14:35
  • 6
    \$\begingroup\$ Nope: ISP requires a working clock source. Only HV programming does not. \$\endgroup\$ – Turbo J Aug 27 '17 at 4:00

Assuming your connection is incorrect, first you need to add a pull-up resistor to the reset pin; 1k-10k should be alright. second, you may need to set the fuse to a higher speed before you can actually upload the code to the chip. That is pretty much all you need.

  • \$\begingroup\$ No. Reset is driven by the programmer, and besides has an internal pullup. \$\endgroup\$ – Chris Stratton Sep 2 '17 at 4:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.