I am having problems trying to figure out how to accomplish this arduino bootloader programming to a separate ATmega32u4 microcontroller chip. While I have tried to find as many examples/guides as I could online, a lot of them are not entirely consistent and I am not experienced enough to know what is mandatory or optional, or even if I am doing something entirely stupid.
Hardware:
Arduino Micro (used for Arduino as ISP) - Pinout from from another forum member.
Atmel ATmega32u4 soldered onto a basic breakout board from Adafruit
16 Mhz oscillating crystal with two 20pF ceramic capacitors going to ground wired to the XTAL pins of the 32u4
10uF electrolytic capacitor, grounding the RESET pin of the Arduino.
(Should I ground the RESET on the Arduino Micro at all? I have read a couple of guides saying that it isn't needed, and a lot that say to do it) Also, is pin 10 on the Micro supposed to be the reset pin when using the Arduino as ISP sketch in the example sketches in the Arduino IDE?
I am trying to use the Arduino Micro as an ISP programmer to burn the Arduino bootloader onto the ATmega32u4 and I have been unsuccessful so far, so I turn to the forum to help. I understand that this is probably a non-issue that could be easily fixed by someone with anyone with just a hint more expertise in microcontrollers, however I am at a pretty basic level of understanding at this point in time, and am at a brickwall with the troubleshooting.
I have the everything rigged onto a breadboard.
I have tried with direct wiring the MOSI to MOSI, MISO to MISO and SCK to SCK from Micro to 32u4. I have also tried using the ICSP pins on the Arduino Micro.
I have tried wiring the RESET pin of the 32u4 (with and without capacitor) to the RESET pin of the Arduino Micro and to pin 10 of the Micro.
I am using the Arduino IDE to try to burn the bootloader.
The Arduino as ISP example sketch was successfully uploaded to the Arduino Micro with no errors.
Then I wired the 32u4 to the Arduino Micro. I choose Arduino as ISP under Tools > Programmer.
I am not sure which board to choose under Board, Arduino Leonardo or Arduino/Genuino Micro, but I have tried programming the bootloader with both of them and got the same error.
I've noticed that the ArduinoISP sketch says to use pin 10 of the programming Arduino, so that is why I tried pin 10 instead of the actual RESET pin.
I plug in the USB from my PC (the pin 13 LED does pulse like normal) and click Burn Bootloader.
When I hit Burn Bootloader, it gives the message Burning Bootloader to I/O board (this may take a minute), and it does linger on that for about a minute or a little longer.
Then the error message:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
Error while burning bootloader.
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03
The only LED that blinks while it attempts to upload the bootloader is the RX LED.
I'm hoping that someone might be in the mood to lend an knowledgeable hand with my (probably) newbie mistakes.
I also have a SparkFun USB to Serial Breakout - FT232RL , but I'm not even entirely sure if that could be used to burn the bootloader at all.