Burning bootloader error for ATMega328P TQFP - Help Needed

Background Info :-
My project use ATMega328P TQFP chip with PCB have the 6 ICSP pins.
My PCB board have build in 16MHz crystal and 22pF capacitors.
My program is running perfectly when using on Arduino UNO.

  1. When I try to upload ArduinoISP sketch into empty UNO. It is okay.

  2. When I connect the ISP pins into the target board with UNO and try to burn the bootloader. The errors message is

avrdude: Device signature = 0x0000ff
avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.

so, i try to amend the signatures. I search in my Arduino1.8.2 directory, the files avrdude.conf in ...\hardware\tools\avr\etc and I found the signature is already in 1E 95 0F as attached.

Can somehelp send me some light into this ?

Can I burn bootloader and upload sketch into a ATMega328P in my project PCB ?

Thank you

error2.txt (3.37 KB)

The Device signature = 0x0000ff indicates a problem. You're not going to be able to work around it by changing the signature. Don't mess with avrdude.conf. Check to make sure your wiring is all correct.

How Arduino know I am using TQFP of ATMega328 as the board still UNO ?

The Uno uses an ATmega328P so that's why Arduino IDE expects you to be using an ATmega328P. If you had a board with a different microcontroller selected from the Tools > Board menu then it would expect that microcontroller.

Arduino Uno uses an ATmega328P at 16 MHz, so that's the right board to select.

Check with DVM in continuity mode and the pinout chart that the pins connected to the programmer are actually connected to the pins of the chip, and that none of them are shorted to Vcc, Ground, or eachother.

What is the different of burn bootloader with 'ArduinoISP' in example sketch and just burn bootloader without upload the ArduinoISP in example sketch ?

The former will work, the latter will not work.

But my later work when I use a purchase prebuild nano to tqfp socket programmer. That is why I feel strange as I read many instruction from the internet is I need to upload ArduinoISP sketch and burn it.

If you buy a dedicated ISP programmer it already has the correct firmware on it. If you're using an Uno as a programmer you need to upload firmware to it. The Uno isn't just going to magically turn itself into a programmer without specialized code running on it.

This is the very first we've heard about this "prebuild nano to tqfp socket programmer" so of course I assumed your last reply was talking about the Uno.

Installing a Bootloader often works better when you have a dedicated Programmer. The Programmer connects to the ICSP pins and writes into memory directly, under a computer's control.

I use a dedicated Programmer to bootload all my devices. I also offer Standalone Programmers that will load a bootloader, or a sketch, or a bootloader + sketch, from an SD card without needing a PC.

http://www.crossroadsfencing.com/BobuinoRev17/

It was a nano board with tqfp socket for burning program. I attached the photos.

nano-tqfp.jpg

If you didn't upload the ArduinoISP sketch to the nano it must have shipped with that sketch already on it, which would make sense for this particular product.

No. It doesnt make sense. Where the sketch reside in new chip without burn bootloader ?

The sketch ArduinoISP shall be loaded into the new Atmel to be bootloaded. I still need to burn bootloader but without the sketch. That means the IDE burn bootloader is different from ArduinoISP burn bootloader ?

No! The ArduinoISP sketch is on the programmer's microcontroller. It's the programmer's firmware. You are not putting the ArduinoISP sketch on the target microcontroller.

Please take some time to read this:
https://www.arduino.cc/en/Tutorial/ArduinoISP

hamisu-anguan:
That means the IDE burn bootloader is different from ArduinoISP burn bootloader ?

What do you mean by "IDE burn bootloader"?

IDE burn bootloader here means in Arduino IDE, Tools > Burn Bootloader.

I did that on the new target IC, then only upload my program into it.

Oh. Do you means to burn programmer chip I need to burn ArduinoISP sketch.
To burn target IC I just need to burn bootloader. Is that right ?

  • File > Examples > 11.ArduinoISP > ArduinoISP
  • Connect Uno that will be used as "Arduino as ISP" programmer to computer
  • Tools > Board > Arduino/Genuino Uno
  • Tools > Board > Port > select the port of the Uno
  • Sketch > Upload
  • Unplug programmer Uno from computer
  • Connect programmer Uno to target microcontroller as described at https://www.arduino.cc/en/Tutorial/ArduinoISP.
  • Plug programmer Uno into computer
  • Tools > Board > select the correct board for your target microcontroller
  • Tools > Programmer > Arduino as ISP
  • Tools > Burn Bootloader

I am confuse is all new Atmel chip need to burn bootloader, but when i read some forum users mention that programming ATTiny does not need to burn bootloader.

So which is right ? Is ATTiny chip does not require bootloader ?

If you want to upload over serial you need a bootloader. That is the usual way to use Arduinos. However, if you use an ISP programmer to upload via Sketch > Upload Using Programmer there is no need for a bootloader and in fact the bootloader will be erased when you do that.

The bootloader uses up flash memory. The ATtiny chips have very limited amounts of flash memory so it's best to not waste any on a bootloader.