Legacy PIC, STM8 and 8051 products: why move them to the MG51

Stay 8-bit, stay 5V, and move for about ₹19 per IC — without a 32-bit redesign, level shifters or a full firmware rewrite.

Legacy PIC, STM8 and 8051 products: why move them to the MG51 — Nuvoton MG51FB9AE development board

The legacy product problem

If your product runs on a PIC, an STM8 or an old 8051, you can move it to the Nuvoton MG51 for about ₹19 per IC and keep it 8-bit and 5V. The PIC or STM8 in your product may cost you more.

Many products in Indian factories still run firmware written 10 or 15 years ago. The board works, customers are happy, and nobody wants to touch the code. Often the engineer who wrote it has moved on.

The trouble starts with the chip. Prices rise, lead times stretch, and supply news changes without warning.

The worst time to move is when the old chip is out of stock and a production line is waiting.

Why a 32-bit MCU is often the wrong fix

Most migration advice says: move to a 32-bit MCU like the STM32. For a 5V legacy product, that is usually more work than the product needs.

A move to a 3.3V 32-bit chip typically brings a new 3.3V supply rail on the board, level shifters on lines that talk to 5V relays, sensors and displays, a new toolchain and new libraries for the team to learn, and a full firmware rewrite. You pay for all of it, and the product does exactly what it did before. If the product never needed 32 bits, the cheaper path is to stay 8-bit.

Two ways to update a 5V legacy product: move to a 32-bit MCU versus move to the MG51

STM8 users face an extra question mark. ST marked the STM8 family "not recommended for new designs" in 2023, then later moved STM8S and STM8L back to active. Its suggested successor, the STM32C0, does not run at 5V. (STM8 status is based on ST community updates — check ST's website for the current status.)

Why the MG51

Beyond the low price, the MG51 adds features many legacy chips lack.

ReasonWhat it means for your product
Runs from 2.4V to 5.5VFits your existing 5V board, with no level shifters
7 kV ESD, 4.4 kV EFTSurvives static shocks from touch and spikes from relays and motors, so fewer resets and field failures
Standard 8051 core, up to 24 MHzOld 8051 code needs the fewest changes
Rated -40°C to +105°CSuits panels, appliances and outdoor enclosures
Internal 16/24 MHz oscillator, ±1%No external crystal needed for most designs
12-bit ADC, up to 12 PWM, 2 UARTs, I2C, SPI, 4 timersEnough for sensing, control and communication
Flash lock bits, execute-only secure areaProtects your firmware from copying
Built-in bootloader area (LDROM)Supports firmware updates in the field
Keil C51, IAR, or free SDCCNo paid tool lock-in
7 kV
ESD — survives a static shock from touch
4.4 kV
EFT — keeps running through relay/motor spikes

The MG51 is a new series in full mass production. Nuvoton runs a 10-year product longevity program for its MCUs, counted from a product's introduction, and has publicly committed to long-term 8-bit MCU production.

Where the MG51 fits

Nuvoton built the MG51 for home appliances, LED lighting control, motor control and industrial automation. In practice, that covers most 5V legacy 8-bit products:

  • Home appliances and their control panels
  • LED lighting and dimming
  • Fans, pumps and small motor control
  • Temperature controllers and timers
  • Battery chargers and power supplies
  • Display and keypad panels
  • Industrial automation and relay control

What changes when you move

If your firmware is written in C, the application logic carries over. Only the layer that talks to the hardware changes.

Coming fromWhat carries overWhat you rework
Old 8051 (AT89 family and similar)Most code, including 8051-specific codeRegister names, GPIO modes, clock setup, programming method
PICApplication logic in CGPIO, timers, interrupts, ADC and UART setup
STM8Application logic in CGPIO, timers, interrupts, ADC and UART setup

Three MG51 details catch most first-time users:

  1. Pins start in quasi-bidirectional mode. Set push-pull with PxM1 / PxM2 where you drive loads.
  2. Some registers need a timed-access (TA) sequence before a write.
  3. Internal RAM is small. Place large arrays in __xdata.

Test first, then build

Don't redesign the power circuits and PCB first. Test your code on the MG51 before you commit.

Test first, then build: 1) get the dev board, 2) start from example code, 3) port and test, 4) go to production
  1. Get the MG51 Dev Board (₹295). The MG51FB9AE comes already soldered, it takes 5V or 12V input, and it is ready for prototyping.
  2. Start from our example code on the product page and our GitHub repo.
  3. Port your application logic and test it on the board.
  4. Once it works, buy the ₹19 MG51 IC for your production PCB.

Plan your move

Your legacy product doesn't need a 32-bit redesign to stay in production. It needs a cheaper, newer 8-bit chip that still runs at 5V.

Have a product on PIC, STM8 or an old 8051? Contact Micronode — we're happy to help you plan the move, from firmware porting to a new production PCB.

Example code: github.com/micronodein/mg51-dev-board
Follow us on LinkedIn for more on 8-bit and legacy firmware.

Have a legacy product on PIC, STM8 or 8051? We help you plan the move, from firmware to production PCB. micronode.in

Sources

  • Nuvoton MG51 product page
  • Nuvoton Product Longevity Program
  • ST Community: STM8 status updates
  • EEVblog: STM8 status and STM32C0 voltage

Have a legacy product on PIC, STM8 or 8051?

We help you plan the move, from firmware porting to a new production PCB.