1

I have been working on a project that I program using the ATMEGA 328p inserted into an Arduino Uno, and then remove it to put it on my breadboard. I now have realized how inadvisable this is, since I had a pin breakoff. I have spare ATMEGA 328 chips and a borrowed functional Arduino Uno. Starting with the instructions here from the official Arduino site, and then progressing to the instruction set here for using the different device signiture, I eventually gave up on using the IDE and ran avrdude from the command line. Here is my command:

C:\Program Files (x86)\Arduino\hardware\tools\avr\avr\bin>avrdude -v -v -c arduino -p m328p -P com9 -b19200 -F

And the following results:

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch`

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : com9
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us
    
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9514
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7

avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

From these results, I want to conclude that the bootloader is now installed onto my ATMEGA 328. However, when I try to upload to it using the Arduino Uno "shell" with its 328p removed,I get the following error:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x80

(and the next 10 tries) Is there something I am missing? I am connecting the reset pin to pin 1 of my ATMEGA 328, and the RX/TX to pins 2 and 3, respectively.

Any help on this one would be greatly appreciated.

4
  • 1
    Why do you think that you have burned the bootloader? Neither the avrdude commandline, nor its output mention the bootloader hex file or writing to the Atmega. I'm not that firm with the avrdude options, but it seems, that you just read the fuses. You have written nothing (it would have told you if it had written something).
    – chrisl
    Apr 15, 2022 at 22:39
  • Most people will never have a legitimate reason to use avrdude's -F options. That message you get from avrdude about -F is a not a prescription. I see you mentioning 328P and 328, but it's not clear to me that you understand that these are different devices, which is why they have different signatures. So what you actually have? Is there a P in your actual chip's part number or not?
    – timemage
    Apr 16, 2022 at 13:36
  • chrisl is right, you are not uploading anything. The line to upload in one of my makefiles for an ATmega328 looks like this... avrdude -p m328 -c avrispv2 -P COM4 -U flash:w:hexfile.hex -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xf9:m -v -B 10 -i 10... if you want to upload, you need to specify both the write target and a hex file (-U flash:w:hexfile.hex)
    – Sim Son
    Apr 16, 2022 at 14:25
  • ...you probably have to change the command a little bit if you want to upload a bootloader, I don't quite remember atm... but you definitely need to use the -U option for upload
    – Sim Son
    Apr 16, 2022 at 14:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.