I wrongly bought a atmega328-pu, but anyhow I was able to burn the arduino bootloader on it.
Can I substitute the 328-pu I have with the original 328p-pu on the arduino uno rev3 board? (I want to substitute it so I can upload my program).
Yes, you can do that. As long as it has the arduino bootloader on it, a 328 is a 328. Some models have a different minimum voltage, but that won't be an issue on the arduino board.
I think you have to use avrdude (for the ATmega328 without 'p') with the bootloader for the Uno (ATmega328p with 'p').
You probably can't do it from within the Arduino IDE, because the signatures don't match.
After that you can use the Arduino IDE and upload the sketches as if it was a Uno (with ATmega328p with 'p').
The ATmega328p has a few more registers, so if the Arduino uses those, you are in trouble. But I'm using my ATmega328 (without 'p') as a Uno for a while and have not encountered a problem yet.
ADDED: Maybe I misunderstood the question. I thought you want to replace a ATmega328p (with 'p') with a ATmega328 (no 'p') and use is as a Arduino board. If you want to replace the ATmega328 with ATmega328p, there is no problem at all.
thank you both for your kind replies.
Yes I confirm, replacing the arduino uno atmega328p-pu with a atmeg328-pu (with arduino bootload) it works.
In case anyone needs I followed this tutorial (Burning the Bootloader on ATMega328 Using Arduino UNO As ISP : 5 Steps (with Pictures) - Instructables) to burn the bootloader on it.
I have used the atmega328 and set it on the breadboard following these instructions (Arduino - Home).
To upload sketches to my "home made arduino on breadbord" I just take it of every time and program it using my arduino uno.
I solved this using the arduno uno to programm my board:
- uploaded the ArduinoISP sketch to my uno
- close arduino program and turn arduino off and made these connections to the board: http://arduino.cc/en/uploads/Tutorial/BreadboardAVR.png
- Edit avrdude.conf (located in \hardware\tools\avr\etc) by going to the Atmega328P entry and then replacing "0x1e 0x95 0x0F" with "0x1e 0x95 0x14".
- open the program again and select tools > programmer > arduino as ISP
- open sketch to be uploaded to the arduino on the board
- file > load with a programmer