Custom PCB question

Not sure if this is the right sub but I am trying to redesign the PCB to use either TQFP or VFQFN IC. I am not sure if this is the right way to do it or not:

If I moved one of the chip elsewhere, there will be a lot of twisted traces. And if I moved TQFP to bottom and use vias to connect to top, I'd have to bend all the pins and mount it upside down.

Any idea? Chip shortage sucks, no one carries either packages of ATMega328pb (yes the B variant) unless I want to risk ordering direct from China.

I assume that you tried to attach or post some sort of PCB layout that the forum software could not cope with

Odd BBCode broke?? Direct link:

The image simply copied and pasted here

The footprint within footprint looks good to me.

I don't see pads for a crystal/caps or resonator, or sufficient pads for 0.1uF caps on all the VCC, AVCC, and Aref pins.


LCSC have around 18000 in stock. It's a chinese company, but a reputable one.

Aref isn't needed here and I can safely skip it. The chip is running 100% digital, no analog reading. B variant has only 2 VCC pins, not 3 like the older versions. Also I am running off internal oscillator so no need for external clock.

Still need a cap on each of VCC and AVCC.

1.1.7 AVCC
AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.
Note that PC6...4 use digital supply voltage, VCC.

There seems to be some 328-mu left on the market. You could grab a few along with 328p-pu DIP ICs just in case. All similar chips are OOS.

It looks to me that I already have a pad of capacitors from VCC and AVCC.

Ok, I didn't realize the PB variant only had 1 VCC pin, I am used to seeing two.

That will be a damper on power use, as VCC is only rated for 100mA, and not 200mA like the '328Ps:

33.1 Absolute Maximum Ratings
DC Current VCC and GND Pins: 100.0 mA

You'll have to hunt around for parts too, 328PB seems to be low on stock at a lot of places:

Ordered some from LCSC.

I like to use B variant because:

  • analog A6 and A7 are full GPIO and not analog only input like on other 328s. On other 328s, those 2 pins are multiplexed through other analog pins and internally is wired for input only.
  • 2 more GPIO from pin 3 and 6 as D23 and D24
  • a bit cheaper than non B variant.

26 total GPIO pins by using internal oscillator (27 if you disable reset pin but you'd need HV programming to change code or restore reset), 8 analog inputs, and 10 PWM pins. The only drawback is this do not come in PDIP form at all. PDIP would lose a few pins anyway, having 6 total pins fewer than TQFP and VFQFN, unless Microchip goes with 32 pin PDIP

(It seems quote tags and other tags need to be on their one separate line to work - Moderator)

Not an issue if I'm not using it to directly drive bunch of blinking LEDs. Most of what I use is control other chips or functions and generally chip to chip communication is in the micro-amp range.

Wow, is showing "17135 Instock" for Atmega328PB-AU (32 pin TQFP).
Many other places are showing 0.
Nice find.

Packaging: In a tray, that may be why, don't know if pick & place machines can work with that. Tube or tape & reel may be more standard.
For hand install, tray is perfectly fine.