Should I use only the Atmega328P-PU or could I use the Atmega328-PU microcontroller?I ask tis question because I have already made a standalone earlier with the Atmega328P-PU which worked.Now I want to make another with the Atmega328-PU to which I want to burn the bootloader but I can't.What is wrong?
The 'P' is the PicoPower version, which is used by some Arduino boards. The ATmega328 (without 'P') is not one of the microcontrollers that is supported by Arduino. They have different signatures.
It is possible to force the bootloader of the Arduino Uno (with ATmega328P) onto a ATmega328. After that a sketch can be uploaded via the RX and TX as if it was a Arduino Uno.
That is possible because the compiler generates the same code for both microcontrollers, and the small differences are not used.
I have a ATmega328 with Uno bootloader, but I forgot how I did do that. Perhaps I created a new board in "boards.txt" with the other signature, or I used avrdude with the '-F' option to force code onto the wrong microcontroller.
The package (DIP, or SMD or other) does not matter. They have the same inside. That is why wrote about ATmega328P, The "-PU" does not matter.
Thanks peter n.You solved two of my questions with your detailed answers.