Nano Clone with ATMEGA328PB and invalid signature

I have a Nano clone with mini USB connector, but it has an ATMEGA328PB processor. It can be programmed as an ATMEGA328P, as it returns the correct signature. (yes, I know, the so-called signature is just embedded in the bootloader loaded by the supplier).

Fine, sez I, but I want to use the second serial port. So I need a '328PB Board def'n; I'll setup Minicore, select the 328PB variant, and away we go.

So in detail,
A) Upload blink with different flash rate to the Nano, to verify our new device can be programmed as received; that works, using the normal, not old, bootloader setting in the IDE; Note, the signature is

avrdude: Device signature = 0x1e950f (probably m328p)

B) Upload blink with different flash rate to the Uno, board Uno, to verify we are programming the Uno; that works;
(both those steps were just precautionary);

C) Upload example "ArduinoISP" to the Uno, preparing for changing the Nano's bootloader;
D) Install Minicore boards manager;
E) Select boards manager "Minicore", board "Atmega328"
F) Select variant 328PB,
G) Verify COM port is correct
H) Unplug the Uno from the PC
I) Wire up the Uno as a programmer(wiring verified, ICSP header to ICSP header, except that pin 5 on the Uno header goes to the Reset pin on the Nano clone
J) Plug the Uno back in
K) Select "burn bootloader"

and we should be good?

But, No. The burn fails as follows:

Using port : COM6
Using programmer : stk500v1
Setting baud rate : 19200
AVR part : ATmega328PB
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : STK500
Description : Atmel STK500 v1
HW Version : 2
FW Version : 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.0 us
XTAL frequency : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 00 00 00 (retrying)
Device signature = 00 00 00 (retrying)
Device signature = 00 00 00
Error: invalid device signature
Error: expected signature for ATmega328PB is 1E 95 16

  • double check connections and try again, or use -F to carry on regardless

Avrdude done. Thank you.
Error while burning bootloader.

The real device signature doesn't seem correct; also, that XTAL frequency.

I'm confused. I thought this worked for me, back in March 2025, but I admit to taking no notes; is there a step I've missed, or are these Nano clones truly only usable as Atmega328P Nanos?

It's getting all zeros as the device signature. So it's not making a connection to the Nano. Did you remember to install a 10uF cap to ground on the Uno's reset pin?

Didn't install a cap on either, as I had no recollection of it being needed back then.

Clarification - On the Uno's reset pin? I.e. on the programmer's reset, not the target?

Yes, on the Uno's (the programmer's) reset pin.

Okay, I'll hunt one down after lunch. Thanks.

Better to use the wiring suggested with the ArduinoISP sketch including the LEDs to show if the UNO is working properly and shows the 'heartbeat'

You missed a step.

  • Select 'Arduino as ISP' as the programmer (Tools->Programmer->Arduino as ISP)

I've never had to use one either.

Did you specifically modify the ArduinoISP sketch to put the reset signal on pin 5? Usually its pin 10 to RESET on the target.

I believe it is only needed sometimes. I have certainly gotten by without it, but in other cases the auto-reset circuit may interfere with the programming operation. I guess it is probably best to just use one regardless when encountering a failure just to eliminate the auto-reset as a potential factor.

EEK. Well. 3 responses, observing 3 flaws. Deferred the capacitor; selected Arduino as ISP, and fixed the embarrassing wiring error, and it appears to have programmed.

C:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/bin/avrdude -CC:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/etc/avrdude.conf -v -patmega328pb -cstk500v1 -PCOM6 -b19200 -e -Ulock:w:0xff:m -Uefuse:w:0b11110101:m -Uhfuse:w:0xd7:m -Ulfuse:w:0b11111111:m
Avrdude version 8.0-arduino.1
Copyright see avrdude/AUTHORS at main · avrdudes/avrdude · GitHub

System wide configuration file is C:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf

Using port : COM6
Using programmer : stk500v1
Setting baud rate : 19200
AVR part : ATmega328PB
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : STK500
Description : Atmel STK500 v1
HW Version : 2
FW Version : 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.0 us
XTAL frequency : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 1E 95 16 (ATmega328PB)
Erased chip

Processing -U lock:w:0xff:m
Reading 1 byte for lock from input file 0xff
in 1 section [0, 0]
Writing 1 byte (0xFF) to lock, 1 byte written, 1 verified

Processing -U efuse:w:0b11110101:m
Reading 1 byte for efuse from input file 0b11110101
in 1 section [0, 0]
Writing 1 byte (0xF5) to efuse, 1 byte written, 1 verified

Processing -U hfuse:w:0xd7:m
Reading 1 byte for hfuse from input file 0xd7
in 1 section [0, 0]
Writing 1 byte (0xD7) to hfuseC:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/bin/avrdude -CC:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1/etc/avrdude.conf -v -patmega328pb -cstk500v1 -PCOM6 -b19200 -Uflash:w:C:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.1.3/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i -Ulock:w:0xff:m
, 1 byte written, 1 verified

Processing -U lfuse:w:0b11111111:m
Reading 1 byte for lfuse from input file 0b11111111
in 1 section [0, 0]
Writing 1 byte (0xFF) to lfuse, 1 byte written, 1 verified

Avrdude done. Thank you.
Avrdude version 8.0-arduino.1
Copyright see avrdude/AUTHORS at main · avrdudes/avrdude · GitHub

System wide configuration file is C:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\8.0-arduino.1\etc\avrdude.conf

Using port : COM6
Using programmer : stk500v1
Setting baud rate : 19200
AVR part : ATmega328PB
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : STK500
Description : Atmel STK500 v1
HW Version : 2
FW Version : 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.0 us
XTAL frequency : 7.372800 MHz

AVR device initialized and ready to accept instructions
Device signature = 1E 95 16 (ATmega328PB)
Auto-erasing chip as flash memory needs programming (-U flash:w:...)
specify the -D option to disable this feature
Erased chip

Processing -U flash:w:C:\Users\camsysca\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.1.3/bootloaders/urboot/atmega328pb/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b5/urboot_atmega328pb_pr_ee_ce.hex:i
Reading 384 bytes for flash from input file urboot_atmega328pb_pr_ee_ce.hex
in 1 section [0x7e80, 0x7fff]: 3 pages and 0 pad bytes
Writing 384 bytes to flash
Writing | ################################################## | 100% 0.42s
Reading | ################################################## | 100% 0.23s
384 bytes of flash verified

Processing -U lock:w:0xff:m
Reading 1 byte for lock from input file 0xff
in 1 section [0, 0]
Writing 1 byte (0xFF) to lock, 1 byte written, 1 verified

Avrdude done. Thank you.

Thanks to both @Deva_Rishi and @BitSeeker . Can't split the solution, so it goes to @Deva_Rishi .

My understanding is the capacitor is needed for MCUs like the 328P that do not have built-in USB. I have never been able to get it to work without the capacitor, but I've only ever used IDE v1.8. Maybe it's different for v2. In any case, it would be nice to have a definitive ruling. I think the official Arduino instructions still call for the capacitor.

For what it's worth, I have ten such devices now re-bootloadered and individually tested as dual-serial Nanos. No capacitance required.

I also have one, of a slightly different make, that takes the bootloader just fine, but refuses to accept uploading. Nothing obviously different, but it just refuses to work. Setting that aside, suitably labelled, as I don't need it for now.

C

And your programmer Arduino was the classic Uno?

An Elegoo Uno R3 I had laying around, donated by a friend. All of the above was performed using the 1.8.19 IDE. No 2.x for me, yet.

Ok, well unless there's something special about an Elegoo Uno, the capacitor is clearly not required in all cases. Perhaps the Arduino ISP sketch has changed from IDE v1.8 to v2.x, so the Uno is not automatically reset at the beginning. I think the only purpose of the capacitor was to prevent the DTR line from resetting the Uno. But it would be nice to know when it's needed and when it isn't.

Could you clarify the reset wiring in step I? Did you connect the Nano's RESET to the Uno's D10, or to pin 5 on the Uno's ICSP header? A clear photo of the connections would help others check the setup.

D10 Uno to ICSP5 on the Nano. "Checking wiring" not required, as it works that way. I'll post a wrapup in a few minutes, just to close out the thread.

I actually think that when 'upload using programmer' is used, no DTR signal is sent. (just an estimated guess) The programmer handles the reset of the target board, and the programmer obviously doesn't need to be reset.
For some of the boards, like the Attiny13a using microcore, upload and upload using programmer are the same (always upload using programmer)

I don't think so.

In this case we're talking about 'Burn Bootloader', but it would be the same either way. What I know for sure is that in IDE v1.8.x, the capacitor is needed if I use any of my clone Nanos as the programmer. That is also true outside the IDE, such as when using AVRDudess. But it may be different with IDE v2.x, which I've never tried.

It's just confusing. And I'd like to quit suggesting the capacitor to people when the problem is something else.

That's interesting, because in this case, I've been talking about an Elegoo Uno pin (has a 28 pin DIP Atmega328P) driving the reset pin on a clone Nano; there should be nothing electrically different about a clone Nano pin driving the reset pin on a clone Nano, that I'm aware of. So, what gives?

I'll hold off on posting a summary for a bit, while we discuss this.

Well that i have never tried, but isn't the DTR on a Nano anyway a bit more twitchy ? And of course there is the difference in USB to TTL converters (ch340 or cp210x vs Atmega 16u2)