Problema caricamento sketch

Buongiorno a tutti, sto cercando di caricare su Nano un semplice sketch di test di un sensore ma il sistema mi dà errore; escluderei problemi dovuti al Nano (ne ho cambiati 2) o al cavo di collegamento alla porta. Lo stesso programma caricato su AT85 (con le dovute modifiche) usando "arduino as ISP" funziona.
Qualcuno può aiutarmi?

Allego un .pdf con i codici di errore
ErrArduino.pdf (60.1 KB)

Saluti
Enrico

Puoi semplicemente mettere i codici di errore nel messaggio, utilizzando <CODE>.

Arduino:1.8.19 (Windows 10), Scheda:"Arduino Nano, ATmega328P"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\mbsco\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\mbsco\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mbsco\OneDrive\Desktop\File Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266 -warnings=none -build-cache C:\Users\mbsco\AppData\Local\Temp\arduino_cache_24473 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\mbsco\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\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\mbsco\OneDrive\Desktop\File Arduino\Prova_Radar\Prova_Radar.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\mbsco\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\mbsco\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mbsco\OneDrive\Desktop\File Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266 -warnings=none -build-cache C:\Users\mbsco\AppData\Local\Temp\arduino_cache_24473 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\mbsco\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\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\mbsco\OneDrive\Desktop\File Arduino\Prova_Radar\Prova_Radar.ino

Using board 'nano' from platform in folder: C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Using core 'arduino' from platform in folder: C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...

"C:\\Users\\mbsco\\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\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\sketch\\Prova_Radar.ino.cpp" -o nul

Generating function prototypes...

"C:\\Users\\mbsco\\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\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\sketch\\Prova_Radar.ino.cpp" -o "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\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\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Sto compilando lo sketch...

"C:\\Users\\mbsco\\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 -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\sketch\\Prova_Radar.ino.cpp" -o "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\sketch\\Prova_Radar.ino.cpp.o"

Compiling libraries...

Compiling core...

Using precompiled core: C:\Users\mbsco\AppData\Local\Temp\arduino_cache_24473\core\core_arduino_avr_nano_cpu_atmega328_9e754735445dbe7d543b366c2038b980.a

Linking everything together...

"C:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/Prova_Radar.ino.elf" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266\\sketch\\Prova_Radar.ino.cpp.o" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/..\\arduino_cache_24473\\core\\core_arduino_avr_nano_cpu_atmega328_9e754735445dbe7d543b366c2038b980.a" "-LC:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266" -lm

"C:\\Users\\mbsco\\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\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/Prova_Radar.ino.elf" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/Prova_Radar.ino.eep"

"C:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/Prova_Radar.ino.elf" "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/Prova_Radar.ino.hex"

"C:\\Users\\mbsco\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\mbsco\\AppData\\Local\\Temp\\arduino_build_55266/Prova_Radar.ino.elf"

Lo sketch usa 2218 byte (7%) dello spazio disponibile per i programmi. Il massimo è 30720 byte.

Le variabili globali usano 222 byte (10%) di memoria dinamica, lasciando altri 1826 byte liberi per le variabili locali. Il massimo è 2048 byte.

C:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b115200 -D -Uflash:w:C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266/Prova_Radar.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\mbsco\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM5

         Using Programmer              : arduino

         Overriding Baud Rate          : 115200

         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 : Arduino

         Description     : Arduino

         Hardware Version: 3

         Firmware Version: 4.4

         Vtarget         : 0.3 V

         Varef           : 0.3 V

         Oscillator      : 28.800 kHz

         SCK period      : 3.3 us



avrdude: AVR device initialized and ready to accept instructions



Reading | ################################################## | 100% 0.00s



avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: reading input file "C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266/Prova_Radar.ino.hex"

avrdude: writing flash (2218 bytes):



Writing | ################################################## | 100% 0.28s



avrdude: 2218 bytes of flash written

avrdude: verifying flash memory against C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266/Prova_Radar.ino.hex:

avrdude: load data flash data from input file C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266/Prova_Radar.ino.hex:

avrdude: input file C:\Users\mbsco\AppData\Local\Temp\arduino_build_55266/Prova_Radar.ino.hex contains 2218 bytes

avrdude: reading on-chip flash data:



Reading | #########################################Errore durante il caricamento dello sketch

######### | 100% 0.29s



avrdude: verifying ...

avrdude: verification error, first mismatch at byte 0x0000

         0x62 != 0x0c

avrdude: verification error; content mismatch



avrdude done.  Thank you.




Carica il programma, ma alla verifica rileva che il codice sul microcontrollore è diverso da quello che è stato inviato...
Falso contatto?

Soluzioni?

Hai provato con questo sistema anche sul nano?

Si, non va, stesso messaggio.

3° Nano: sembra funzioni!!

Nano comprati DOVE? ... link?

Guglielmo

Non saprei, i primi due sono "vecchi" di almeno 8/10 anni e, finora hanno sempre funzionato egregiamente, il terzo dovrebbe essere più recente probabilmente inizio scorso anno; tutti sono cinesi.

Enrico