ATMEGA328P

I have a problem with the ATMEGA328P on my Arduino Uno with dip IC not SM. I was building another project that needed one of these micro-controllers. I ordered it from Digi-key but they sent me an ATRMEGA328 instead, so I borrowed the 328P from one of my Arduino Unos to complete the project. I have since received the correct part for the project and I wish to reprogram the 328P to put back into the Arduino Uno.

I have no idea how to do this and I have tried to blank the 328P and set the fuses back to Uno status but it still will not accept a sketch or a bootloader upload.

Can someone point me in the right direction?

Edit: I do have an TL866 IC programmer and able to reprogram the IC if I can get the necessary info.

drsaylor:
they sent me an ATRMEGA328 instead

I know it's off topic, but if you want to use that ATmega328 with the Arduino IDE, you can easily add support for it by installing the MiniCore boards platform:

drsaylor:
I have no idea how to do this and I have tried to blank the 328P and set the fuses back to Uno status

What was the procedure you used to do this?

It's not the ATMEGA328 I want to use, it is the original IC the ATMEGA328P that I want to put back in. But because it was reprogrammed it no longer works properly. I am trying to find out ifthis can be done.

drsaylor:
It's not the ATMEGA328 I want to use, it is the original IC the ATMEGA328P that I want to put back in.

I understand. That's why I said:

pert:
I know it's off topic ...

when I was referring to the ATmega328. It was just an aside to let you know that there is good support available for this chip, so it's still very useful. I would hate to see a good AVR go to waste!

drsaylor:
I am trying to find out ifthis can be done.

I'm sure it can. If you'll answer my question, we should be able to get your Uno back up and running in no time.

Ok, I must not be making myself clear or I am misunderstanding what you are saying. So let me reiterate, I have a ATmega328P, which is the original IC I borrowed from the Uno for a project. I used the TL866 to reprogram the IC for the new project, now I want to put it back into the Uno where it came from. I don't understand why I need to add the core libraries for the chip that came out of the PCB in the first place.

I blanked the ATmega328P and set the fuses to the values for the Uno I found online with the TL866 programmer. But it will not accept a sketch and I cannot load the bootloader using another newer Uno as AVR ISP.

I am asking if there exists a Hex or binary file containing the original Uno program for the ATmega328P that I can use the EEprom programmer to return the ATmega328P to it's original function for the Arduino Uno.

If this file does not exist, how do I make the ATmega328P useable for the Uno again?

drsaylor:
I don’t understand why I need to add the core libraries for the chip that came out of the PCB in the first place.

YOU DON’T. You need MiniCore if you want to use the ATmega328 you received by accident. You don’t need to use MiniCore for your ATmega328P.

Please, forget I ever said anything about MiniCore. I thought it would be possible for me to make a helpful aside that would allow you to put your ATmega328 to use, but it turns out it’s causing too much confusion.

drsaylor:
I cannot load the bootloader using another newer Uno as AVR ISP.

OK, now we're getting somewhere. Please post the full error message you get when you try to load the bootloader.

drsaylor:
I am asking if there exists a Hex or binary file containing the original Uno program for the ATmega328P that I can use the EEprom programmer to return the ATmega328P to it's original function for the Arduino Uno.

If this file does not exist, how do I make the ATmega328P useable for the Uno again?

All you need to do is get the Burn Bootloader process to complete successfully and your Uno will be back to working perfectly. So you need to focus all your efforts on the Arduino as ISP and the Arduino IDE's Tools > Burn Bootloader process.

This is what I get:

Error while burning bootloader.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03x

Ok, quick update. I was able to upload the Bootloader and the Arduino with the ATmega328P is now working. It looks like the webpage I was using to set up the other Arduino as ISP had an error in wiring. I went to a different site, wired it according to that site and it worked fine. Thank you for all the interesting info.

I'm glad to hear you got it working. Thanks for taking the time to post an update. Enjoy!
Per