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.
-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 aP
in your actual chip's part number or not?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
)-U
option for upload