The com port seems to have changed during your various attempts. Ensure you always change the settings in the IDE to match. Also, if you wired the capacitor incorrectly, it is possible that the sketch (or bootloader) you were attempting to write onto the target Nano has overwritten the ISP sketch on the Arduino you are using as a programmer. Reinstall this to be sure.
Having had a short period of success yesterday I hate to give up. But I'm getting the following identical error report when I try to program each Nano (old bootloader) using a Uno with Arduino as ISP. (And a very similar one in the later sections when I try to burn a bootloader.)
After freshly uploading ArduinoISP to the UNO, I'm adding the 10uF cap between its Reset and Gnd, setting Nano board and port, then Upload Using Programmer.
So I'm at something of a dead end now, after two full days work!
Can I at least force the Nanos to have appropriate bootloaders? Attempts so far result in a similar report to uploading.
FWIW, each Nano is running the 'fastblink' sketch (100/100ms) that I uploaded during my 'success period'.
Arduino: 1.8.19 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\terry\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\terry\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\terry\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=2341_0043 -ide-version=10819 -build-path C:\Users\terry\AppData\Local\Temp\arduino_build_566231 -warnings=all -build-cache C:\Users\terry\AppData\Local\Temp\arduino_cache_883256 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\MY SKETCHES\BLINK_LEDs_etc\BlinkFastBlinksPlusSerial\BlinkFastBlinksPlusSerial.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\terry\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\terry\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\terry\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=2341_0043 -ide-version=10819 -build-path C:\Users\terry\AppData\Local\Temp\arduino_build_566231 -warnings=all -build-cache C:\Users\terry\AppData\Local\Temp\arduino_cache_883256 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\MY SKETCHES\BLINK_LEDs_etc\BlinkFastBlinksPlusSerial\BlinkFastBlinksPlusSerial.ino
Using board 'nano' from platform in folder: C:\Users\terry\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\terry\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\sketch\\BlinkFastBlinksPlusSerial.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\sketch\\BlinkFastBlinksPlusSerial.ino.cpp" -o "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\sketch\\BlinkFastBlinksPlusSerial.ino.cpp" -o "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\sketch\\BlinkFastBlinksPlusSerial.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\terry\AppData\Local\Temp\arduino_cache_883256\core\core_arduino_avr_nano_cpu_atmega328old_370488ea9a6e87527c1bee2bcb2379a8.a
Linking everything together...
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/BlinkFastBlinksPlusSerial.ino.elf" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231\\sketch\\BlinkFastBlinksPlusSerial.ino.cpp.o" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/..\\arduino_cache_883256\\core\\core_arduino_avr_nano_cpu_atmega328old_370488ea9a6e87527c1bee2bcb2379a8.a" "-LC:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231" -lm
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/BlinkFastBlinksPlusSerial.ino.elf" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/BlinkFastBlinksPlusSerial.ino.eep"
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/BlinkFastBlinksPlusSerial.ino.elf" "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/BlinkFastBlinksPlusSerial.ino.hex"
"C:\\Users\\terry\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\terry\\AppData\\Local\\Temp\\arduino_build_566231/BlinkFastBlinksPlusSerial.ino.elf"
Sketch uses 2156 bytes (7%) of program storage space. Maximum is 30720 bytes.
Global variables use 200 bytes (9%) of dynamic memory, leaving 1848 bytes for local variables. Maximum is 2048 bytes.
C:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -Uflash:w:C:\Users\terry\AppData\Local\Temp\arduino_build_566231/BlinkFastBlinksPlusSerial.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:\Users\terry\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM5
Using Programmer : stk500v1
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 20 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 : STK500
Description : Atmel STK500 Version 1.x firmware
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 = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Hope I'm right to raise the following related question rather than start another thread:
In this discussion:
one contributor said:
โI bootload all my '328P chip based boards as 16 MHz Arduino Uno, then I don't need to worry about selecting the right board type.โ
Iโm still struggling to master various bootloading issues, so that sounds good advice. Is it? And simple to do? If so, why not widely adopted?
EDIT:
Meanwhile I've emailed the seller and included this:
I would imagine that I'm not the only purchaser to have this
disappointment. I suggest that you at least amend your description to
include the following two points:
"These Nanos are the 'Old Bootloader' version. They may also need
external programming."
Better clones are fine.
Elegoo have always worked.
CH340 is a perfectly good chip and have seen knock-off FTDI chips.
It is quite often used. That is turning a ATMEGA328P based Nano into a Uno. I actually do it with all mine to gain to gain1.5K flash space. You clearly then select "UNO" in the IDE instead of "Nano old bootloader" etc. I didn't mention it earlier because it may have added to the confusion.
Check that there is a common ground between your Nano and the Uno that you are using as an ISP programmer. That could explain this erratic behaviour. If that is not the problem, please add a picture of your set up.
I think the "genuine Uno" thing goes back to the Nano bootloader change. When Arduino changed the Nano bootloader, it neglected to change the fuse that sets how much flash memory is allocted to the bootloader. So it remained 2K even though the new bootloader fits in 512 bytes. Some people wanted to reclaim that memory but keep the new bootloader. The easy way to do that was to just reflash the bootloader and fuses specifiying the device as an "Uno", which has the new bootloader stored in 512 bytes.
I have found that the capacitor on the reset pin of the programming Arduino (not the target) is essential. But I'm still using v1.8.8 of the IDE. I don't know if it's needed in V2xx.
When you plug one of these new Nanos into USB, do to get the USB connection chime? If so, how does it show up in Device Manager? Mine shows up under Ports as a CH340?
Quite sure it went back way before that. People wanted that extra 1.5k so loaded the Uno bootloader to the Nano.
Thanks. Do I simply set the Nano board as Uno and then use Tools > Burn Bootloader (from the real Uno), and in future treat it as a Uno?
Photo
attached. Taken shortly after changing from the tidier wiring shown at the top. I wanted to check the cause was not loose connection(s) in the ICSP block I've always used.
Ignore LED, preset and N/O button also on breadboard.
EDIT
Behaviour identical with temporary rewiring so reverted to my tidier version:
Interesting.
Will the Nano still have 2 extra Analog pins compared to the UNO?
I should also say that there is a 328P knockoff that isn't really a 328P. It's discussed here:
https://forum.arduino.cc/t/lgt8f328p-arduino-clone-chip-atmega328p/1045139
Is that a capacitor between Vin and Reset on the Nano ? I don't think that should be there.
What is the purpose of the push button ? It appears to short the power rails.
I can't check the ICSP header wiring but I guess you've checked it often enough.
Yes. That is unaffected by the boot loader or the boards.txt file.
Unless it is a complete fake, the picture in post #17 implies it is not the LGT8F328 near-clone. Of course a complete fake cannot be ruled out.
Thanks for the reply.
That addition of a small cap was based on this tip from Nick Gammon. Although I was (still am) unclear why Vin to Gnd and not 5V to Gnd. Tried both. Now removed.
"Tip
If you are programming your own board, or using a breadboard, then decoupling capacitors are required! Decoupling capacitors are typically ceramic capacitors, 0.1 ยตF (100 nF) between Vcc and Gnd (and also AVcc and Gnd if applicable), close to the chip.
If you don't use them you may find that the chip is recognized, but cannot be programmed. They are not an optional extra.
If you are just programming one Arduino board from another, then they will already have decoupling capacitors on the board, so you don't need to worry about them."
Changing Nano to Uno.
I tried this the way I described in post #48
" Do I simply set the Nano board as Uno and then use Tools > Burn Bootloader (from the real Uno), and in future treat it as a Uno?
Was that correct? Hardly expected it work on these misbehaving Nano anywyay, and it didn't. Neither with Nano USB or Uno/ISP.
Could you spell out the exact steps please.
I'm confused. The capacitor is supposed to be between the reset pin and ground of the programming device - the Uno in this case.
Well, you did have the new Nano working for a while, so there probably is a way to get back to that state. If you have an older Nano that works fine, I think one approach at this point would be to use the Uno as ISP to flash the Blink example to that Nano, just to be sure you're doing everything right, and you're working with a known good part. Then you could just drop in the new Nano and do the same same thing, or perhaps also flash the bootloader.
As I understand it, Nick is recommending a small ceramic decoupling capacitor between the +ve and ground lines. I think you are referrring to the electrolytic cap, typically 10uF.
The latter has certainly been one cause of my problems; with dozens of test runs, remembering whether to have it in place (for uploading to the Nano via ISP), and removing it when the ISP sketch need re-uploading to the Uno!
He specified Vin, but I would have thought 5V? The former is at 4.47V here, the latter at 4.87V.
Is there anyone here who has done this successfully without the reset capacitor? If so, what version of the IDE did you use? I use v1.8.8, and for me the capacitor is necessary.
Yes I have. But I did it by placing a miniature slide switch to disconnect the reset signal from the auto reset circuit. Works every time.
No that is wrong. because then the capacitor would be on the other side of the regulator chip. Sure put one there as well, but it does more good where he said to put it.