ATmega328PB problema caricamento sketch

Buonasera a tutti, spero possiate aiutarmi. Ho acquistato una scheda nano clone con chip Atmega328pb e connessione ch34X ho provato in mille modi a caricare gli sketch ma nulla.
Ho comprato persino un USBASP per riprogrammarlo ma nulla.

carico qui la risosta di errore che mi da quando carico uno sketch spero qualcuno di voi possa aiutarmi, Grazie.

`avrdude: Version 7.1-arduino.1
** Copyright the AVRDUDE authors;**
** see https://github.com/avrdudes/avrdude/blob/main/AUTHORS**

** System wide configuration file is C:\Users\Michele\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.2.2\avrdude.conf**

** Using Port : COM4**
** Using Programmer : arduino**
** Overriding Baud Rate : 115200**
avrdude ser_open() error: cannot set com-state for \.\COM4
avrdude main() error: unable to open programmer arduino on port COM4

avrdude done. Thank you.

Caricamento non riuscito: errore durante il caricamento: exit status 1`

Secondo me mancano informazioni x aiutarti.

  1. Che scheda è ? magari metti il link a dove hai comprato
  2. Che core carichi ? sembra minicore.
  3. sistema windows ? quale ?
  4. l'errore che posti è usando cosa? il usbasp ? visto che dice "** Using Programmer : arduino**"

Qui: arduino uno - avrdude ser_open() can't set com-state - Arduino Stack Exchange
in base a quel problema sulla com parla di problema di driver.
da dove hai scaricato e come hai installato il driver ch340 ?

grazie per avermi risposto.
la scheda acquistata è questa: Schede Nano clone

il core caricato in arduino IDE è Minicore:
ATmega328
BOD 2.7V
Bootloader Yes UATR1 328PB only
colck 16mhz
EEPROM RETAINED
LTO disabled
variant 328pb

Sistema operativo windows 11 pro
l'errore postato è con la scheda collegata direttamente al pc.

il driver installato l'ho scaricato da qui: driver ch340

Perché avresti scelto la variate 328PB che è un'altra MCU? Il tuo clone di Arduino Nano monta un 328P che è cosa diversa rispetto a 328PB e NON puoi caricare su un 328P codice compilato per 328PB.

Come core, lascia stare il Minicore che NON ti serve e scegli il core standard di Arduino selezionando la scheda Arduino Nano. Dovrai solo vedere se scegliere Old Bootloader (cosa più probabile essendo un clone) o solo Bootloader (che è quello che oggi viene messo sui nuovi Arduino nano originali).

Guglielmo

Grazie per la risposta.
quando mi sono arrivate le schede ho provato a caricare gli sketch con le impostazioni AVR originali arduino nano old bootloader, ma mi dava errore non riuscendo a capire il perchè, ho fatto alcune ricerche e mi sono imbattuto in questo chip ATmega328PB vedendo che sulla scheda c'è scritta questa dicitura ho pensato fosse dovuto al chip diverso. Adesso ho riprovato ad inserire le impostazioni nell'IDE come mi hai consigliato e questo è l'errore che esce:

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\Michele\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM5
     Using Programmer              : arduino
     Overriding Baud Rate          : 57600
     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: 2
     Firmware Version: 1.16
     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.00s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATmega328P is 1E 95 16
Double check chip, or use -F to override this check.

avrdude done. Thank you.

Caricamento non riuscito: errore durante il caricamento: exit status 1

Allora non capisco ... tu dici che montano il ATmega328PB (leggi la sigla)?

Perché sul sito che hai indicato dicono:

Nano moduli 100% compatibile con Arduino,Utilizza i chip ATmega-328P e C-H-340.

ma, in effetti, nelle foto che mettono, sembra di leggere MEGA328PB :open_mouth:

Ovvio che se invece il chip montato è un'altro, allora NON sono affatto dei cloni di Arduino Nano (che, ribadisco, monta il ATmega328P), ma delle schede totalmente diverse e ... allora si che ci vuole un'altro "core" ... :roll_eyes:

Io le rimanderei indietro e chiederei anche il rimborso ... altro che cloni, quelle non hanno nulla a che vedere con Arduino Nano 3328P !!!

Guglielmo

Grazie Guglielmo, ho provato a fare le cose che mi hai detto, poi ho modificato il file avrdude.conf e magicamente 2 delle 3 schede funzionano e caricano gli sketch senza problemi assurdità delle assurdità.

ho cambiato questa voce nel file avrdude.conf:
"
part parent "m328"
id = "m328p";
desc = "ATmega328P";
signature = 0x1e 0x95 0x0F;

ocdrev              = 1;

;

part parent "m328"
id = "m328pb";
desc = "ATmega328PB";
signature = 0x1e 0x95 0x16;

ocdrev              = 1;

;
"
e tutto sembra funzionare correttamente su due schede.
sulla terza scheda appare questo errore:

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\Michele\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x7d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7d

avrdude done.  Thank you.

Caricamento non riuscito: errore durante il caricamento: exit status 1

NO, non devi fare quello che hai fatto ... tu cerchi di ingannare AVRdude facendogli credere che la "signature" sia quella giusta, ma il ATmega328P e il ATmega328PB sono DUE cose DIVERSE (anche se in parte compatibili) quindi potranno saltare sempre fuori problemi, blocco dei programmi, errori di esecuzione, ecc.

Restituisci quelle schede perché il venditore dichiara il FALSO ed hai diritto al rimborso e cerca degli Arduino Nano che montino veramente il ATmega328P.

Guglielmo

ok grazie!

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