Cannot load 8Mhz boot loader

Hello

I have purchased an arduino UNO board with a removable ATMmega328p chip. This chip was programmed to run on a 16Mhz crystal and I want to try and breadboard it, load the 8Mhz boot loader on it thus removing the need for the external crystal.

I have followed the schematic here: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard under "Minimal Circuit"

I have downloaded the breadboard-1-6-x.zip files and loaded it into my IDE which is version 1.8.9

I have also tried pulling the reset pin up to 5V with a 10k resistor (and without).

The error I keep getting is avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x21

Can someone tell me what I am doing wrong?

Do I need to have the 16Mhz crystal setup on the breadboard then load the 8Mhz boot loader? Or can I do it without the crystal? Is there anything else I might be missing?

spaceuino:
Do I need to have the 16Mhz crystal setup on the breadboard then load the 8Mhz boot loader? Or can I do it without the crystal? Is there anything else I might be missing?

Since the configuration fuses on the ATmega328P were already set to use the external clock source, yes. You only need to supply a clock source long enough to switch the fuses to make the chip use the internal oscillator (the Arduino IDE sets the fuses according to the board definition during the Burn Bootloader process). After that, you will no longer need the crystal.

Ok so I hooked up the 16Mhz crystal between pins X1/X2 with some 22pF capacitors to ground and tried to program it again

Now I get the error: avrdude: stk500_recv(): programmer is not responding

Please do this:

  • (In the Arduino IDE) File > Preferences
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Tools > Burn Bootloader
  • After the Burn Bootloader process fails, you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the Burn Bootloader output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

Thanks for the response

Here is the error:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "ATmega328 on a breadboard (8 MHz internal clock)"

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM8 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m 

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM8
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x24
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x24

avrdude done.  Thank you.

Error while burning bootloader.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Just to eliminate any possible errors in your breadboard setup, could you try putting the atmega328p back onto the UNO board and burning the bootloader from there? Once the 8MHz bootloader is burned successfully, you will no longer need the crystal on the breadboard, then you can try burning the bootloader again using the breadboard if your intent is to test if that is working properly.

This might be a stupid question, but you are using an external programmer to burn the bootloader?