Главная Статьи

MCU Cross-Reference Checklist: Pin, Electrical, Firmware

Why "pin-compatible" is not a verdict

When the MCU on your bill of materials goes out of stock, the first suggestion is usually a part described as "pin-compatible". That phrase only promises one thing: the substitute fits the same footprint. It says nothing about whether the pins do the same jobs, whether the chip runs on your supply voltage, or whether your firmware will even start on it.

A safe substitution is three separate checks, and all three have to pass. The example through this article is a pair of parts listed on this site: ATmega328P-AU · MICROCHIP (TQFP package) and its same-package relative ATmega328PB-AU. They share a footprint — and they still differ in ways that matter. Every claim below ends the same way: confirm it against that part's own datasheet, because cross-reference rules are family habits, not guarantees.

Step 1 — Pins and package: does it fit, and does each pin do the same job?

Start with the physical facts. A TQFP-32 part and a QFN-32 part are not interchangeable even if both have 32 pins: the footprint, the soldering process and the board layout all differ. Check the package code in the ordering number, then the pin count, then the pinout table in the datasheet — in that order.

  • Same package, different pinout. Two MCUs in the same TQFP-32 body can assign different functions to the same pin numbers. A pin that is a plain GPIO on one part can be a crystal input or a reset line on the other. Fitting the board is necessary; matching the pinout is what makes it work.
  • Power and ground pins move too. Even when the signal pins line up, power and ground pins are not always in the same places. A layout that powers the original part correctly can feed the substitute wrong if the pinout was assumed rather than checked.
  • Suffixes carry the package. In ordering numbers, the suffix is often where the package lives — AU for TQFP in the ATmega328P-AU example. Dropping or guessing a suffix is how a QFN ends up on a TQFP board. Send the full ordering number in the inquiry, suffix included.

Step 2 — Electrical: will it run on your board's power and clock?

A part that fits the board can still fail electrically. Compare the limits side by side before anything is soldered.

  • Supply voltage range. The substitute's operating voltage range must cover your board's rail, including its low end. A part rated for a higher minimum voltage may brown out on a 3.3 V rail that the original tolerated — or fail only at temperature extremes, which is worse, because it passes the bench and fails in the field.
  • Clock and speed. The maximum clock frequency and the internal oscillator's accuracy differ between parts. A design that relies on the internal oscillator for UART timing can lose characters on a substitute with a looser oscillator tolerance, even when the firmware is identical.
  • Memory size. Flash, SRAM and EEPROM sizes are not interchangeable downward. Code that fits the original with room to spare can overflow a substitute with less flash; a smaller SRAM can break a design that allocates buffers at run time. The rule is one direction only: equal or larger, never smaller, unless the firmware has been rebuilt and retested for the smaller part.
  • Current and drive strength. I/O drive current, total current limits and ADC reference behaviour all belong on the comparison sheet. A substitute that cannot source the current your outputs need will look fine in a logic test and fail under load.

Step 3 — Firmware: will your code run on it unchanged?

This is the step most substitutions skip, and the one that causes the most expensive rework. The ATmega328P and ATmega328PB pair is the cautionary case: same TQFP-32 package, but the PB variant adds peripherals and carries a different device signature, so code and tools built for the P do not transfer without checking.

  • Device signature and tool support. Programmers and bootloaders identify the chip by its signature bytes. A different signature can make the toolchain refuse to program the part at all — the board is fine, the chip is fine, and nothing can be flashed onto it until the tool configuration is updated.
  • Register map and peripherals. Extra peripherals are not free: new registers, different default states and different interrupt vectors can change behaviour that existing code assumes. Equally, a peripheral the original had may be missing or wired differently on the substitute. Diff the register maps; do not trust the family name.
  • Fuse, bootloader and startup behaviour. Fuse defaults, bootloader size and startup timing are part of the part, not part of your code. A substitute with different fuse defaults can start with the wrong clock source or a locked bootloader section.
  • Test on the substitute, not on the original. Passing tests on the original part prove nothing about the substitute. The validation run — programming, boot, peripherals, communication and a temperature or voltage margin check — has to happen on the actual substitute lot.

Checklist: what to compare, and what to send

| Check | What it tells you | What to send in the inquiry |
|---|---|---|
| Package code and pin count | Whether it fits the board at all | Full ordering number, suffix included |
| Pinout table | Whether each pin does the same job | Note any pin-function differences you found |
| Supply voltage range | Whether it runs on your rail | Your board's supply voltage |
| Clock and oscillator accuracy | Whether timing-critical interfaces hold up | Clock source and any UART/timing tolerance |
| Flash / SRAM / EEPROM | Whether your firmware fits and runs | Firmware size, if the substitute is smaller in any memory |
| Device signature | Whether your tools will program it | The exact substitute part number, not the family name |
| Registers and peripherals | Whether the code's assumptions still hold | Which peripherals your firmware uses |
| Lot consistency | Parts, label and documents agree | Ask for lot and date-code confirmation on the quoted lot |

How to send an MCU substitution inquiry that gets a usable answer

Through the inquiry page, send the original part number, the substitute you are considering, the quantity, and — most importantly — whether substitution is acceptable at all and who on your side approves it. A quote confirmed for one part number does not carry over to a substitute, even a pin-compatible one. That lot-by-lot discipline is the same one we set out for hard-to-find parts in How to Source Obsolete & Hard-to-Find ICs Without Getting Fakes, and it applies to a current MCU just as much as to an obsolete one: the substitute is a new part number, and it earns its place by passing the three checks, not by sharing a footprint.

FAQ

Is a pin-compatible MCU a drop-in replacement?

No. Pin-compatible means the footprint matches. The pinout, electrical limits and firmware behaviour still have to be checked — any one of the three can fail a substitution that fits the board.

What is the difference between the ATmega328P and the ATmega328PB?

They share a TQFP-32 footprint, but the PB variant adds peripherals and carries a different device signature, so firmware and programming tools built for the P need checking before they are used on the PB. Confirm the details in each part's datasheet rather than assuming the family name covers the difference.

My code fits the original's flash. Can I use a substitute with less flash?

Only if the firmware is rebuilt and retested for the smaller part. Memory checks go one direction: equal or larger is safe to assume; smaller needs proof.

Why does the device signature matter?

Programmers and bootloaders use signature bytes to identify the chip. A different signature can stop the tool from programming the part, even when the hardware is correct. Check tool support for the exact substitute part number before ordering.

Does MOQ or availability change when I accept a substitute?

The substitute is a different part number with its own availability and packaging. A quote for the original does not transfer to it — confirm the substitute's lot, quantity and packaging separately, by inquiry.

По теме

Перекрёстная ссылка на IGBT: ток, напряжение и потери переключения ↗ Перекрёстная ссылка на драйвер затвора: сила управления и изоляция ↗ Перекрёстная ссылка на линейные стабилизаторы: падение напряжения, шум и тепловые пределы ↗ Перекрёстная ссылка на преобразователи постоянного тока: сначала топология, потом деталь ↗