Problem flashing Atmega328P U-TH MCU

Thread Starter

kowshik1729

Joined May 10, 2020
20
Hi all,

I've been having a very big problem since 2 days. I got a brand new Atmega328P U-TH IC and made a custom board around it. Due to covid lockdown I am not able to purchase any programmers like USBasp, so I decided to use my Arduino UNO as ISP programmer. However, When I tried to burn the bootloader using Arduino IDE I am having the error " Yikes! Invalid Device signature" I then tried to lot of time hustling over this issue and was able to figure that there's something wrong with my fuse and lock bits.

So I tried to write the fuse bits using sinaprog tool and also with avrdude command line however I was unsuccessful in all the attempts. I would like to ask for help on how to resolve this issue. Please ask me for more information if I haven't provided in this message.

Thanks
 

BobaMosfet

Joined Jul 1, 2009
2,110
Invalid Device Signature means that you told it to program a chip that wasn't the one in the socket. Each AVR MCU returns a signature set of bytes. They read these and compare them with whatever MCU you're telling it to program so they program it correctly. This is not a fuse-bit issue.

To understand fuse-bits (and you need to understand them! - or leave them at default until you do), read the appropriate datasheet for your MCU.

https://www.allaboutcircuits.com/electronic-components/datasheet/ATMEGA328-PU--Microchip/
 

Thread Starter

kowshik1729

Joined May 10, 2020
20
Invalid Device Signature means that you told it to program a chip that wasn't the one in the socket. Each AVR MCU returns a signature set of bytes. They read these and compare them with whatever MCU you're telling it to program so they program it correctly. This is not a fuse-bit issue.

To understand fuse-bits (and you need to understand them! - or leave them at default until you do), read the appropriate datasheet for your MCU.

https://www.allaboutcircuits.com/electronic-components/datasheet/ATMEGA328-PU--Microchip/
Thanks for the reply boba. Yes I have actually read about fuse bits. My setup was able to recognize the device's signature properly, but I am not able to bootload it with any file nor program it with any of my sketches. I have attached a snip from sinaprog GUI where it read my device signature and fuse bits (I highly doubt those fuse bits read are problamatic)
aac.PNG

only after I got these fuse bits I cross checked against a fuse calculator and found they're not good. So wanted to change these bits and also want to program my MCU with my test codes.
 

Thread Starter

kowshik1729

Joined May 10, 2020
20
Hi guys, I found the solution. Thought to update here so that will be useful for anyone in the future. I found a simple solution.

Uploaded Arduino ISP sketch to Arduino UNO. Then downloaded MCUdude's mini core board packages from the Boards manager by pasting this link https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json in Additonal Board manager's URL's in the preferences tab.

Then went to the sketch I want to upload. Selected Tools -> Arduino Nano (Old booatloader) then clicked Upload using Programmer. That solved the problem.
 

arddddd

Joined Jul 15, 2021
3
Hi guys, I found the solution. Thought to update here so that will be useful for anyone in the future. I found a simple solution.

Uploaded Arduino ISP sketch to Arduino UNO. Then downloaded MCUdude's mini core board packages from the Boards manager by pasting this link https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json in Additonal Board manager's URL's in the preferences tab.

Then went to the sketch I want to upload. Selected Tools -> Arduino Nano (Old booatloader) then clicked Upload using Programmer. That solved the problem.
Hello !

Im having this very problem, but im just using the Arduino IDE+Nano, is there a way to implement your solution having only the IDE and an arduino nano? Mine has also the subfix "U-TH" and cant load anything into it, other arduinos i have with "U-PH" never had this problem. Also when one puts the link into preferences, its just that, or one has to "activate" that download? Tried it and still cant install anything on the Nano. Thank you!
 

Phil-S

Joined Dec 4, 2015
238
Hello !

Im having this very problem, but im just using the Arduino IDE+Nano, is there a way to implement your solution having only the IDE and an arduino nano? Mine has also the subfix "U-TH" and cant load anything into it, other arduinos i have with "U-PH" never had this problem. Also when one puts the link into preferences, its just that, or one has to "activate" that download? Tried it and still cant install anything on the Nano. Thank you!
Is this a genuine Arduino Nano or a cheap clone?
This is a very old problem if using a clone.
Have a look on the other side of the Nano board.
There is a chip, it's the USB to serial chip.
Genuine Nanos use or did use, an FTDI FT232 chip.
This is the one that works out of the box.
If it says CH340, it's the cheapo version.
In the Arduino IDE, go to Tools>Processor>select old bootloader and see how you get on.
There is a but.
Some clones use what looks like an FTDI chip, but examine carefully, and you might find it's overprinted.
FTDI genuine chips are embossed
 

Phil-S

Joined Dec 4, 2015
238
Hi all,

I've been having a very big problem since 2 days. I got a brand new Atmega328P U-TH IC and made a custom board around it. Due to covid lockdown I am not able to purchase any programmers like USBasp, so I decided to use my Arduino UNO as ISP programmer. However, When I tried to burn the bootloader using Arduino IDE I am having the error " Yikes! Invalid Device signature" I then tried to lot of time hustling over this issue and was able to figure that there's something wrong with my fuse and lock bits.

So I tried to write the fuse bits using sinaprog tool and also with avrdude command line however I was unsuccessful in all the attempts. I would like to ask for help on how to resolve this issue. Please ask me for more information if I haven't provided in this message.

Thanks
If you want a good guide to burning bootloaders, fuses, reading signatures, go no further than Nick Gammon's website, Gammon.au.
He has a library called Arduino, with a load of tools to diagnose Atmel chips.
 

arddddd

Joined Jul 15, 2021
3
Is this a genuine Arduino Nano or a cheap clone?
This is a very old problem if using a clone.
Have a look on the other side of the Nano board.
There is a chip, it's the USB to serial chip.
Genuine Nanos use or did use, an FTDI FT232 chip.
This is the one that works out of the box.
If it says CH340, it's the cheapo version.
In the Arduino IDE, go to Tools>Processor>select old bootloader and see how you get on.
There is a but.
Some clones use what looks like an FTDI chip, but examine carefully, and you might find it's overprinted.
FTDI genuine chips are embossed
Hello thanks for your answer,
Its a cheap clone, ive always used cheap chinese clones and they all worked, until now, so i tried to see differences and found the u-th /u-ph thing. My nano has CH340, inspectioned the ones that always worked for me and even when everything looks the same (ic seems to be exactly the same too), the ic is non labeled, like blank, but its exact size and surrounding components of ch340 one, so must be that.

i went to tools>processor> and didnt see any "old bootloader" label, which one are you refering to exactly? right now its set at AVRISP mkii, ty!
 

arddddd

Joined Jul 15, 2021
3
If you want a good guide to burning bootloaders, fuses, reading signatures, go no further than Nick Gammon's website, Gammon.au.
He has a library called Arduino, with a load of tools to diagnose Atmel chips.
Friend, i bought 4 arduinos, checked the other 3 that are identical, and they all loaded, i had a busted copy. Thanks for the help and pointers, cheers!
 

Phil-S

Joined Dec 4, 2015
238
Friend, i bought 4 arduinos, checked the other 3 that are identical, and they all loaded, i had a busted copy. Thanks for the help and pointers, cheers!
I'm not sure what you have going on there.
You are selecting Nano in the boards selection?
You need to find the bootloader choices.
Using the IDE and a USB cable, the programmer choice doesn't matter.
Make sure you have the latest IDE 1.8.15 or above.
In any sketch, go to TOOLS
Under the Boards header, make sure it says ARDUINO NANO
Under the PROCESSOR heading, where it says "Atmega328P", you should see three choices.
Choose the one that says "old bootloader" - this works with CH340 chips.
Have a look at the chip with a magnifier as they can be difficult to read.
A genuine FTDI chip will have an embossed logo.
I have clones of Nano's here that come from Elegoo - the chip is readable as CH340.
When you buy a clone, you don't know what you are getting.
FTDI chips are faked and I have seen them with white printing where it has been over-printed.
Sometimes the original markings have been rubbed off.
You can be certain that some very dubious components have been used to make them so cheaply, and that does carry risks.
It might only be 5-volts, but it can still burn your house down, the least it does is cause some grief.
 
Top