This page has been "replaced" by the Big Things in Small Packages post on the NZPRG blog.

The Pimoroni IO Expander uses an MS51

The MS51/8051 is a 1980s-era 8 bit microcontroller series. Nuvoton is a Taiwanese manufacturer.

The following description is from the Nuvoton web site:

The Nuvoton MS51/8051 is a series of industrial microcontrollers is based on 1T 8051 core, running up to 24 MHz, with up to 32 Kbyte of Flash memory and up to 2 Kbyte of SRAM. It supports one high precision 24 MHz allowing ± 1 % deviation and one 10 kHz internal RC Oscillators, operating at 2.4V 5.5V voltage and - 40 ℃ 105 ℃.

NuMicro® MS51 is equipped with special features such as up to 15 channels of 500k SPS 12-bit ADC, up to 12 channels of PWM with independent counters and GPIO supports 20 mA driving capability, also with ESD resistivity 8 kV and EFT resistivity 4.4 kV. Combined all these above high performance features, MS51 series is suitable for high-reliability industrial and consumer applications. 

MS51 series offers 10-33 pin packages for a broad range of applications.

My Own Investigation#

My exposure to the Nuvoton MS51 microcontroller came about due to its use in a number of Pimoroni Breakout Garden products, initially their IO Expander board, which provides 6 PWM/digital and 8 analog IO pins, and programmed via Python on a Raspberry Pi using a single I2C connection. Very handy.

Pimoroni RGB Encoder board

A bit later Pimoroni released a pair of RGB LED knob controllers, a RGB Encoder and RGB Potentiometer that internally use the MS51. Recently they even added a tiny Super Dinky Blinky LED blinker board that uses it, even providing github links and instructions on how to hack/reprogram the device. So it's clear Pimoroni have some engineers on staff who like the MS51 as a general-purpose controller.

Back in October 2020 I sent a message into the Pimoroni forum regarding the use of the Nuvoton MS51 microcontroller on their IO Expander Breakout Garden board, asking if they might help me figure out how to hack it. The MS51 is an MCS-51/8051-compatible microcontroller, using the same 1980s-era 8 bit architecture.

Well, nobody answered so I checked out the Nuvoton website and found a plethora of development boards, using ARM Cortex M0, M4, M23 and 8051-compatible processors in "Tiny" and "Maker" (Arduino UNO style) form factors. There's also a suite of development tools.

It looks like both their hardware and software is quite well-documented, with a lot of PDFs on site. The Taiwanese-English is pretty good, and their product line looks to be very extensive. Not a small company.

Some of the Tiny-style boards are truly tiny, and their Maker-style boards (e.g., NuMaker-PFM-M2351) look like nice Arduino replacements, e.g., 64MHz, operating voltage 1.6-3.6v, memory up to 512kb RAM/ 96kb SRAM. Lots of pins and an UNO-compatible USB link connector. Even an on-board Wifi module. Like Arduinos, the processors themselves are typically surface-mounted but are also available in DIPP packaging should someone want to experiment with one on a breadboard.

The Cortex processors would be Arduino-like, whereas the 8051 boards (e.g., NuTiny-N76e616) would take one back to the 1980s. Everything looks to be about US$25.00.

Pimoroni Super Dinky Blinky

The link to the list of Nuvoton development tools includes IDEs for all of its Cortex M0/M4/M23 and 8051 controller boards. This does actually include a customised version of the Eclipse IDE called NuEclipse, with distributions available for both Windows or Linux. It's based on a rather old (2015) version of Eclipse "Mars" but seems functional.

I downloaded and installed NuEclipse for Linux, which seems to be Eclipse customised for C/C++ development, comes with a GCC OpenOCD installer, code support for the 60-odd boards Nuvoton sells, user manuals and some sample files.

There are also three KEIL IDEs: one for US$395, one commercial, one free for the Cortex controllers, and two different IAR IDEs for the M0/M4/M23 and 8051 processors, resp. I downloaded the free version but it unfortunately won't run on the only Windows machine I have available.

As I'm mostly interested in the 8051 I went to the IAR site, searched for the NuTiny-N76E885 board (which is currently on 90% discount for US$2.50), then downloaded the IAR EW8051 Embedded Workbench IDE, available for either a free 30 day trial or a 4K code size-limited installation. When you first open the IDE you have a choice of registering online for the Evaluation Copy. It won't operate until registered.

On starting the IAR IDE it looks a bit like an older, customised version of Eclipse, but basically functional. It doesn't seem like there's any way to connect it to the Pimoroni IO Expander that uses the Nuvoton MS51, so if I want to further investigate I'll have to consider getting one of the Nuvoton controller boards.

I've also contacted their sales department to see about the price for purchase of the IAR IDE for a quantity of one. The installer included a "dongle driver" so I'm hoping they don't use dongle-based license management (yuck). At least for the trial license there's no dongle. If the commercial price of the KEIL IDE ($395) is any indication, the IAR one might be rather expensive. I hope to get a quote from their sales rep, otherwise I'll be limited to 4K code files.


Tags:  Nuvoton