8-bit MCU Selection

8-bit MCUs for Cost-Sensitive Designs

An 8-bit microcontroller earns its spot on a board when the bill of materials is counted in cents and the task is small enough that a wider core would sit idle. Parts this size still ship by the billion, because a lot of products never need more than a few timers and a handful of I/O pins. Selecting one is mainly a question of which family holds its price, stock, and tooling steady across the years a product stays in build.

The jobs that never outgrew eight bits

A 32-bit Cortex-M0+ now costs about what a midrange 8-bit part does, so the price gap that once settled the question has nearly closed at that tier. What keeps eight bits in the socket is the work wrapped around the core. A codebase that already runs clean is the strongest argument against a rewrite. A 5V rail the part takes with no level translator saves a component and a failure mode. Plenty of appliance and industrial boards still run at 5V for noise margin, switching inductive loads near mains-frequency interference, and an 8-bit part rated to 5.5V shrugs off the transients that make a 3.3V core nervous. The choice between an 8-bit and a 32-bit part comes down to conditions like these, long before anyone opens a benchmark sheet.

At the floor of the market the part inside a toy or a charger sells for a fraction of that. These are the low-cost 8-bit MCUs built for toys and appliances, often mask-programmed or one-time-programmable, where a tenth of a cent over a run of millions turns into money someone notices. A thermostat or a washing-machine board spends years reading a sensor or two and closing a relay. The sensor it reads is a separate call, weighed by accuracy against cost the way the controller is.

None of this makes eight bits a default. It is the right part for a narrow set of jobs, and the wrong one the moment a design needs more headroom than the core can give. The skill is in seeing where that band stops.

The families that still ship in volume

An Intel P8051AH microcontroller in a 40-pin plastic dual in-line package, its part markings visible on the black case.
An Intel P8051 in a 40-pin DIP. The architecture outlived its maker and still ships as a licensed core inside other chips. (Photo: Wikimedia Commons.)

The 8051 is the oldest of these and the hardest to kill. Intel let the design go decades ago, and it came back as a core that other vendors license or clone, from Silicon Labs to a row of low-cost houses in Shenzhen. It turns up as the housekeeping brain buried inside a larger chip and as the controller in a cheap USB bridge. The niches the 8051 still holds rest on a mountain of proven code and a per-unit price almost nothing undercuts.

Microchip’s PIC line splits in a way that pays to understand before a part gets picked. The PIC16 is the cheaper, leaner branch, with a narrow instruction set and memory reached through banks that the compiler has to juggle. Its hardware call stack runs only a handful of levels deep, so a call tree that nests too far overflows it with no warning, a trap that has cost more than one team a week of debugging. The enhanced-midrange PIC16F1 parts widened that stack and softened the banking, which is why a fresh PIC16 design rarely starts on the older cores. The PIC18 spends a little more silicon on a C-friendly instruction set and flatter memory, with a hardware multiplier on board, and it pays for itself the moment the firmware grows past trivial. Getting the call between the PIC16 and the PIC18 right early saves a painful port once the code no longer fits the smaller part’s model.

Atmel’s AVR core, now under Microchip, is the one a generation of engineers learned first, and the ATmega and ATtiny parts still anchor a lot of designs. The 2021 shortage hit them harder than the rest, with lead times that ran out past a year and pushed more than a few products onto other families for good. Checking whether the ATtiny or ATmega you want is in stock is now part of the selection itself, and an independent distributor sitting on the reels is often where the gap gets covered when the catalog houses go to backorder.

Renesas brings the RL78 to the same cost-sensitive bracket from a different direction. It is a 16-bit core at heart, sold into the same low-power bracket, with a lineage that merged two older lines, and it earns its place in metering and battery-powered designs where the microamp budget at standby decides the bill. Renesas quotes standby currents down in the hundreds of nanoamps with a wake-up timer still running, plus a snooze mode that lets a peripheral gather readings while the core stays asleep, the kind of figure that sets how long a coin cell lasts in service. Where the design leans on how little the part draws asleep, the RL78 belongs on the short list next to the cheaper alternatives.

These four cover the ground a new cost-driven design is likely to start from. The rest of the field is either a variant of one of them or a part already heading for end-of-life.

The parts on the way out

ST still sells the STM8, and it is cheap, but the company’s attention and its newer tooling have gone to the STM32 for years now. The toolchain shows the neglect too, with a compiler story that never matched the STM32’s, so the parts earn a design-in mainly where price is the whole argument. A design that leans on the STM8 today is building on a line with a quiet roadmap, so the sane move is to keep the migration paths off the STM8 drawn before they are needed, whether that means a jump to a small STM32 or a sideways step to another 8-bit vendor.

NXP’s S08 sits further along the same road, with much of the family already marked not-recommended-for-new-design or gone. A board still carrying one will draw an end-of-life notice before long, and finding a replacement for the obsolete S08 usually means accepting a redesign onto a current 8-bit part or a low-end Cortex-M, since nothing drops into the same footprint and pinout untouched.

What to check before the part is locked

Board space rules out a lot of parts before anything else does. A coin-cell sensor tag or a cable dongle has room for six pins and no more, which is where the smallest PIC parts in their SOT-23 and tiny leadless packages earn their keep, doing one small job in a spot a larger package would never fit.

On-chip data storage is the kind of detail that decides a part quietly. A meter that keeps a running total, or a device that has to hold a calibration through a power cycle, wants byte-writable storage that survives with the supply gone. Many 8-bit parts carry true EEPROM on the die, good for around a hundred thousand writes per cell, a budget that firmware stretches further by spreading writes across a block when one value changes often, and choosing an 8-bit MCU with EEPROM built in spares the board an external chip and the bus to reach it, where a 32-bit part often has to fake the same thing in flash.

Silicon changes under a part number across its life, and the changes show up between date codes. An oscillator that trims a hair differently, an erratum fixed or introduced, an analog block that settles to another accuracy: any of these can surface only on a later lot. The internal RC oscillator is the usual culprit, since its factory trim and its drift over temperature can differ enough between revisions to push a marginal UART link past its error budget, and an ADC’s offset and gain can move a count or two the same way. Running the lot-to-lot compatibility checks against incoming reels, and reading the errata for the silicon revision printed on the part, catches the drift before it ships inside a product.

The errata sheet is not optional reading on any of these families.

From a breadboard to a production reel

An Atmel ATmega328P-PU microcontroller in a 28-pin dual in-line package, the part marking ATMEGA328P-PU readable on its surface.
An Atmel ATmega328P in a 28-pin DIP, the part the Arduino Uno made a household name. The move from that board to a built product is mostly a list of small decisions. (Photo: Wikimedia Commons.)

A great many 8-bit designs of the last decade began on a hobby board, and the gap between that board and a shippable product is wider than it looks. Taking the ATmega328P from Arduino into production starts with dropping the bootloader, which buys back around half a kilobyte of flash and removes a power-up delay, and switching to in-system programming over the SPI lines and reset, the way a factory loads firmware onto a bare part. Then come the fuses, where the real decisions hide. The Uno runs a 16 MHz crystal because that is the safe, known-good clock, but a cost-down design often drops the crystal and its two load capacitors and runs on the internal RC oscillator at 8 MHz, trading those parts off the bill for a clock good to around one percent that drifts with temperature and supply, fine for a slow control loop and a problem for a tight UART link. That same clock choice has a hard limit at 3.3V, where the part cannot run at the full 16 MHz at all and a design has to drop to 8 MHz or lower to stay inside the safe range, the detail that catches a team porting a 5V board down to a lithium cell. The brown-out detector has to be turned on through its fuse so the part holds reset until the rail is high enough to run, because the factory-default setting often leaves it off and a slow-rising supply can otherwise boot the chip into a bad state. The reset pin can be fused into another I/O line to reclaim a pin, at the price of needing high-voltage programming to ever talk to the part again, so on a cheap design that fuse gets set once and never revisited. Lock bits go on at the end to keep the firmware from being read back off the reel. None of this shows on a breadboard running off USB at 16 MHz, and all of it shows up the first week a few thousand units ship, which is why moving off the hobby board takes a bring-up of its own.

Sizing the part to the product

A throwaway gadget can take the cheapest part that runs and carry the risk. A product built to ship for a decade weighs stock, second sources, and the cost of a forced redesign against the cents saved up front, and the arithmetic usually favors paying a little more at the start.

滚动至顶部