Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: hamisu-anguan on Jan 11, 2018, 05:04 am

Title: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 11, 2018, 05:04 am
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











Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 11, 2018, 05:08 am
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.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 11, 2018, 05:15 am
How Arduino know I am using TQFP of ATMega328 as the board still UNO ?
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 11, 2018, 05:23 am
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.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: DrAzzy on Jan 11, 2018, 05:36 am
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.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 13, 2018, 01:55 pm

What is the different of burn bootloader with 'ArduinoISP' in example sketch and just burn bootloader without upload the ArduinoISP in example sketch ?
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 13, 2018, 02:46 pm
The former will work, the latter will not work.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 13, 2018, 03:14 pm

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. 
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 13, 2018, 03:20 pm
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.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: CrossRoads on Jan 13, 2018, 03:29 pm
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/ (http://www.crossroadsfencing.com/BobuinoRev17/)
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 13, 2018, 03:31 pm
It was a nano board with tqfp socket for burning program. I attached the photos.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 13, 2018, 03:39 pm
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.
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 13, 2018, 03:44 pm
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 ?


Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 13, 2018, 03:48 pm
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 (https://www.arduino.cc/en/Tutorial/ArduinoISP)

That means the IDE burn bootloader is different from ArduinoISP burn bootloader ?
What do you mean by "IDE burn bootloader"?
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 13, 2018, 03:54 pm

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 ?

Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 13, 2018, 04:02 pm
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: hamisu-anguan on Jan 16, 2018, 09:58 am
 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 ?
Title: Re: Burning bootloader error for ATMega328P TQFP - Help Needed
Post by: pert on Jan 16, 2018, 10:03 am
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.