I am working with an Arduino UNO and an atmega328p, the problem is that the old chip, was used for a different project. When I bought a new one for a new project and put it in the Arduino (not a protoboard) I was not able to upload any code, not even blink, or Arduino ISP, I selected the Arduino as ISP option and searched on yt and forums. Still, the only results I found were people that put the chip in the protoboard, but I have none and I want to program it in the Arduino if this is not possible then I will try to find a protoboard and I will tell you if it works with it.
Error messages (I don't think you need it):
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"
Sketch uses 4354 bytes (13%) of program storage space. Maximum is 32256 bytes.
Global variables use 482 bytes (23%) of dynamic memory, leaving 1566 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6c
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6c
Problem uploading to board.
By the way, I have no circuit I just have the Arduino and the chip, if I need a circuit please let me know. Thanks if you help me!
By default, the chips sold are programmed to use an internal generator, while the Uno board uses an external clock source. Therefore, you cannot just take and insert a new chip to replace the old one.
You must first change the FUSES to use an external oscillator. This can be done by flashing the Uno bootloader through Arduino as ISP sketch. It is necessary to flash the Arduino as ISP sketch not into this controller, but into another arduino. The chip can be inserted directly into the Uno board, no protoboard needed
A few components are required for the naked chip to work at all. Follow this excellent tutorial to create the minimum "bare bones" Arduino. Then you can use the working Arduino to program the new chip.
But if it was in stock I couldn't buy it cause I need that as soon as possible and I am in Colombia, pretty far from U.S or whatever and the shipment would take days to come
Oh I forgot, I already see it, I will try with the mega hope that it works, so the thing that I understood from that was that when I am done with the circuit then I will upload the code to the programmer and then I need to burn the bootloader and that's it I guess
So when I am done uploading the code to the chip I can do whatever I want with it? Like turning on LEDs or reading button signals or it is limited for a number of things? and also, I program it with the same language or there is another one for it?