Atmega328PB Confusion

Hi Everyone.

I have a small box full of Nano classic old bootloader.
Used a few of them and then the next one I use is the PB version.
I did not saw that .
On power up the board behaved different.

1.There was no BLINK , on_board led.
2.The TX led was ON.

I then plugged the board into my PC and open the Serial monitor and the monitor printed an Analog value that vary if I hold my hand closer to the pins.

Then next I downloaded BLINK .
As always I use.
328P
Old Bootloader

Downloaded and the Led ,pin13, is now Blinking.

This was the last that I could program the Board.
Error; Comport not found.

The Ide shows com6 and the Device manager show CH340 COM6.

My question.
Did the selection of the wrong 328 messed up the bootloader?
On power up the on board Led Flash just once as it did before I programmed it.

No.

Tells you not a lot.

The PB version is a totally different sort of processor and will not work with a normal Classic Nano.

Do a search for PB version. I know that Pololu do some boards.

Does your PB board look like this one?

I just check I have 11 Nanos left and used a few without any problems and they are all 328PB.

The difference between the ones that does not program is the USB chip at the bottom.

The ones that work the USB is chip marked CHA340.
The ones that does not program the USB is not marked , blank no markings.

I programed a few of 328PB Nanos with the marked USB as normal Nanos , old bootloader with out even knowing they are PB version.

Looks like a normal Nano.

The bottom is a little different.
Unmarked USB have a (I think) a transistor in the bottom right corner and the 2 resistors just left of the USB is also different.

So I guess that you do not have a 328PB micro. So lord knows what you have been sent? I assume these came from the hair dresses from China (Alla Barber).

Remember you get what you pay for, were these ludicrously cheap?

1 Like

No not really cheap , also not from Aliexpress or Bangood but a local supplier , they all came in 1 batch but there is 3 ODD ones in a batch of 20.

I have seen these odd ones pop up on this forum and now I have 3. :sob:

Maybe Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch provides a solution.

Thanks.
I did check my CH340 version it is 3.5.2019

and the link you provide is version 3.7.2022 , I did install that version but still does not work >> comm port error.

I tried to program the Nano with a UNO as ISP that I made up, not using the Nano USB , Done programming , but now the UNO has Blink on it and the Nano still does nothing. :rofl:

The next step was to remove the unmarked CH340 and replace it with one of my faulty 328P ones,but the footprint is not the same.

There is also a small xtal next to CH340 old Nanos that is not on the 328BP boards.

The point here is where did your local supplier get them from? I suspect from China and he put a hefty mark up on them.

However, the solution is simple, just take them back and demand a refund, or replacement parts just like the other working ones.

Doesn't everything come from China ? The Chips, the PCB's i mean. Where else are they coming from !

Nick Gammon's sketch to detect ATmega chip types.

Partial copy of article data, more at the link.

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F 
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF 
HFuse = DE 
EFuse = FD 
Lock byte = CF 
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00

Bootloader:

7E00: 11 24 84 B7 14 BE 81 FF E6 D0 85 E0 80 93 81 00 
7E10: 82 E0 80 93 C0 00 88 E1 80 93 C1 00 86 E0 80 93 
...
7FE0: E7 DF 80 32 09 F0 F7 DF 84 E1 DA CF 1F 93 18 2F 
7FF0: DF DF 11 50 E9 F7 F4 DF 1F 91 08 95 FF FF FF FF 

MD5 sum of bootloader = 0F 02 31 72 95 C8 F7 FD 1B B7 07 17 85 A5 66 87 

First 256 bytes of program memory:

The chip signature can be traced down to exact type.

No every thing does not come from China.

The Arduino range is manufactured in Italy, AdaFruit and SparkFun are made in the U.S. A lot of Pimoroni boards are designed and made in the UK.
Pimoroni new products

The big big difference is the quality control that is placed on the components and the assembly. The direct from China stuff is mainly made up from sub standard component from the reject bin of some manufacturer. It often contains chips with the markings sanded off. This is done to prevent the batch code being visible and so enabling the original chip manufacturers to see that reject components are leaking from their factories. Also the sellers of these ultra cheap boards have little or no idea what they are selling. Look at their web sites they often sell clothes as well.

Another example is the Arduino ESP32 board, it specifically mentions the quality control of the assembly as a selling point.

Most countries have manufacturing facilities both on assembly and PCB manufacturer and silicon foundries, that is chip manufacturer. For example all the Raspberry Pi boards are made in the U.K. in fact it is in Wales.

So there is no truth to say everything comes from China.

I did contact the supplier and they ask me to send the boards back , no problem to replace or refund.
They just don't have any stock at the moment or a similar board to test.

+1 For that.

The local supplier have no control over what they get, when they get a 1000 new Nanos everyone is sealed in a little anti static bag and they don't open everyone.

I got 20 Nanos in middle 2023 and only now discovered the one's with the un masked USB.

Now if 10% of the 1000 new Nanos is faulty there should be 100 faulty ones floating around from only one supplier.

These boards randomly appear on this forum.

By this time somebody must know how to get them programmed.

I did program the first one with Blink setup as a normal Nano old bootloader but it only worked once.

I found a video with the exact same unmarked USB 328PB board and the Guy used MiniCore to burn the bootloader and then could program via USB.

https://www.youtube.com/watch?v=eeQJDV_e1Vg

I tried that but it did not work , when I reach a point where there is nothing left to try , I will send these boards back.

I manage to program these boards with a AVRISP MK2 programmer via the Arduino ide using MiniCore so the USB must be faulty or needs a new driver.

1 Like

I have seen but never bought knockoff Unos and Nanos with ATmega168P chips. If your project can fit, the cost was less!

You can use an Arduino as a chip programmer.

Thanks , yes I did also manage to program with a UNO as ISP programmer.

This unmarked USB chip is something weird , cannot upload but Serial.print works.

Any chance it is just the automated reset system that is malfunctioning ?
Try holding the reset button down during compilation and release when the IDE reports the results of the compilation. (this is when the upload attempt starts)

n.b. Could you change the topic name, We are dealing with an ATmega328p here has nothing to do with any 328PB.

I tried the reset button many times does not work.

The boards is indeed 328PB written on the micros.

The problem ones is the those with the unmarked USB chip.

The boards have a signature of 1E 95 16 not the same as 328p.

2023 thread with maybe the same problem

Maybe a clue on GitHub about 328PB clock

A post was split to a new topic: Upload fails: 'can't set com-state for ".\COM13"'