Can't upload program in Atmega328p

There is no problem with uploading program on the first chip by using Arduino IDE.

However, the following chips doesn’t work. Status is shown as uploading and it stucks there. I think it could be because datasheet says 20Mhz for these. if so, how can I use them? Thank you for help.

The frequency does not matter, it’s the max frequency at which the chip will work reliably.

Do the chips have the bootloader installed?

Please enable verbose output during upload and disable verbose output during compilation under file → preferences in the IDE and attempt an upload. Please select all text from the output window and post it here.

@sterretje

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.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM10 -b115200 -D -Uflash:w:C:\Users\bcicek\AppData\Local\Temp\arduino_build_468383/Blink.ino.hex:i

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

     Using Port                    : COM10
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x0f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x0f

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

I think I should program bootloader on chip.

Take a look at Nick Gammon’s website (gammon.au) where he covers in detail loading and working with raw (no bootloader) chips like ATMEGA 328P.

He also has a library for diagnosing chips and for loading bootloaders.

Your board looks like an Elegoo board and as far as I know, and use, they use components of decent quality.

It’s always worthwhile buying raw chips from recognised distributors like Digikey or RS, then at least you can rule out iffy devices.

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.