[solved]Atmega328p not reconized when trying to burn bootloader

Hi all!

I have a new project at school, as i don't need power, i use a atmega328P-AU that controls 40 OI

I have produce the first prototypes but i can't get the bootloader inside !

I have tried with different programmers (USBASP, USBtinyisp), same error:

avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

I have verified MANY times, my ICSP port is ok.

I tried this programmer on arduino board, working great, they detect MCU properly

I have unsolder a 328P and directly connect to ICSP port, avrdude detects it without problem

The problem that blocks the bootloader burning by ICSP port seems to be on my board.... I tried to unsolder the 2 I2C ports, same problem...

This is a part of my pcb

You can also see that i have a supercap to get 'juice' when power is off to write on eeprom, could it be that?

Many thanks for your help

Nic

Sorry I don't have an idea about the "initialization failed, rc=-1" error, but I may be able to help you with your "fried" chip:

n1c0l45:
then i fried it by trying to burn the bootloader without capacitor or quartz... my mistake!

You probably didn't damage the chip at all. When you do a Tools > Burn Bootloader in the Arduino IDE, there are actually two processes:

  • Set fuses on the microcontroller according to the boards.txt definition for the board selected from the Tools > Board menu.
  • Flash the bootloader to the microcontroller.

If you set the fuses for the microcontroller to use an external clock source, but there is no external clock attached, then you will no longer be able to program the chip over ICSP because the processor is not running. The solution is to connect an external clock source like your crystal, after which the problem will be solved.

The 'RESET' pin on the ISCP header shouldn't be going through a capacitor- it should be directly connected to the reset pin on the microcontroller itself.

Thanks for the answer, you're right! i'm gonna try!

thanks

pert:
Sorry I don't have an idea about the "initialization failed, rc=-1" error, but I may be able to help you with your "fried" chip:You probably didn't damage the chip at all. When you do a Tools > Burn Bootloader in the Arduino IDE, there are actually two processes:

  • Set fuses on the microcontroller according to the boards.txt definition for the board selected from the Tools > Board menu.
  • Flash the bootloader to the microcontroller.

If you set the fuses for the microcontroller to use an external clock source, but there is no external clock attached, then you will no longer be able to program the chip over ICSP because the processor is not running. The solution is to connect an external clock source like your crystal, after which the problem will be solved.

thanks for your help

I just try it.... It works perfectly !!

Thanks for your help

BJHenry:
The 'RESET' pin on the ISCP header shouldn't be going through a capacitor- it should be directly connected to the reset pin on the microcontroller itself.

n1c0l45:
thanks for your help

I just try it.... It works perfectly !!

Thanks for your help

You're welcome, I'm glad you got it working :slight_smile: And thanks for letting us know.