I have an ATMEGA328-PU that I bought from Digikey. I was planning on programming it by replacing the 28 pin dip microcontroller in my Arduino UNO R3 board. It's not working, as I guess I am trying to fit a square peg in a round hole...... It's wrong chip to work in an UNO.
So how can I burn the bootloader on this chip and upload code to it?
Yes, I have seen a lot of tutorials on the subject. Breadboard the chip, hook up wires to an UNO, and burn the bootloader from the Arduino IDE. I've also wasted a lot of time following bad tutorials, or ones that didn't address my specific problem.
Thanks so much for that explain. I got it!
I use google translate, and translators don't understand slang and proverbs, so I often read cryptic posts and tend to be difficult to decipher.
Sometimes I post useless posts, but I try to post as much as possible.
I'm sorry if that creates confusion.
And it didn't work. I got an error message that it wasn't recognizing the chip. It came back as ATmega328, not a ATmega328P.....
Following @LarryD link, I was able to get it programmed. Using that method, it came back also as a ATmega328. My Digikey invoice states they shipped me a ATmega328-PU, yet the chip is marked ATmega328. So I don't know what the issue is, but Nick Gammon's programming tools got it up and running.
So I thought I had this thing programmed, but I didn't. It acted like it was programmed because I tried to program the 'blink' sketch to it. Problem was that I still had both the uno and my board connected, so the led on my board was blinking because it was connected to the UNO via digital pin 13. I know this can sound confusing, but that is because I was confused on how to upload code using an UNO to program my board.
I was also confused on the types of atmega 328 - I wasn't paying attention to the fact that there is both a 328P-PU and a 328-PU.
That statement is what made things click in my head. So I did a search and found the solution. As explained here: https://www.instructables.com/Bootload-an-ATmega328/ and in the above statement the signatures are different. That article describes how to change the signature so you can upload code to a 328-PU. Basically, you change the signature from the 328P-PU to that of a 328-PU.