I've bought a ATMega328P from the market and burn bootloader. Then inserted the ATMega328P in Arduino board. Whenever I'm trying to upload the code, Arduino takes too much time but not upload. NB: My USB cable and Arduino board is okay, I've checked my board with original microcontroller.
Show us what is in the error log. Post it using the code tag above.
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 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=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xde
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xde
Failed uploading: uploading error: exit status 1
How did you burn the bootloader?
Sir,
I have two Arduino UNO. New ATMega put in Breadboard and connect with ICSP pin. Then I've burn bootloader.
I can upload code to ATMega via ICSP pin. But not work in Arduino Board.
You can watch this video Sir,
I have never burnt a bootloader, so I am muting.
I've bought new blank MCU.
That is how I've burned the bootloader on new ATmega328Ps that were not supplied with a bootloader already in the chip. I assume you didn't get any error message when burning the bootloader and it completed okay. I don't know what to suggest at the moment, other than trying again. AFAIK new chips come with the fuses set to 8MHz internal clock and burning the bootloader sets the chip to run on 16MHz external crystal. Perhaps there is something that would help in this thread https://forum.arduino.cc/t/bootloader-uploaded-but-usb-is-not-working/1147367/29
-
That circuit requires decoupling capacitors on the 5v pins.
-
Read this discussion.
Sir,
I've got the Burn bootloader done message. Then I can upload that new MCU via ICSP pin from sketch--> Upload using programmer.
If you upload a sketch via ICSP, the bootloader will be erased, so if you want to program the chip in an UNO afterwards the bootloader would need to be burned again.
Sir,
Now, I can't burn bootloader in this new ATMega328P. Below error is showing
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Failed chip erase: uploading error: exit status 1
N.B: I can still upload code via ICSP pin in this new ATMega328P.
- If you are using the 328 on a solderless breadboard, show us good images of your wiring.
Thank you so much sir. Now I can burn bootloader. After burning bootloader, I can also upload code in Arduino board. My problem is solved.
I've learn the process from the link you share with me in first reply.
Thanks all.