Today, I want to discuss the incredible shrinking microcontroller. Early microcontroller vendors packaged their offerings in 40-pin DIPs. They were physically small for what you got then, but huge now. These microcontrollers shared several common features: a lame and very proprietary 4- or 8-bit processor architecture designed more to fit on the die than to deliver much performance, a trivial amount of RAM (64 bytes, 128 bytes if you were lucky), and not much more EPROM (perhaps 1 or 2 Kbytes) to store code and permanent data. Even with such extremely limited features, these early microcontrollers ushered in a new era of embedded design. (For a history of early microcontrollers, see the references below.) Today, we have an embarrassment of microcontroller riches and can select from a very crowded world of microcontroller variants, ranging from 8-bit devices in tiny packages that sell for a penny or two in China to 32- and even 64-bit heavy hitters that can take on some very tough design challenges.
Texas Instruments (TI) has just thrown a tiny-yet-powerful, fits-anywhere microcontroller family into this arena – consisting of the MSPM0C1104, MSPM0C1103, and MSPS003 – which features a 24MHz, 32-bit Arm Cortex-M0+ microprocessor core, a 1Kbyte SRAM, and as much as 16 Kbytes of on-chip Flash memory. In an 8-pad DSBGA package, these TI microcontrollers nominally measure 1.62×0.881 mm and are therefore smaller than a grain of uncooked white rice (I checked this with a digital caliper). The lowest-cost devices in this family sell for 16 cents in 1000-unit quantities, and TI’s MSPM0C1104 LaunchPad development kit costs $5.99.
TI’s MSPM0 microcontroller family is available in a variety of packages including this 8-pad DSBGA package that’s smaller than a grain of uncooked white rice. Image credit: Texas Instruments
Depending on the package you select, you get access to all or just a few of these on-chip resources. The largest packages provide access to 18 heavily overlaid I/O pins (plus power and ground). The smallest package provides access to six overlaid I/O pins (plus power and ground). The processor and the peripherals run from an internal clock with a couple of percent accuracy, which saves one or two pins for a clock input or external crystal. In some of the larger packages, you get access to the internal high- and low-frequency clocks, which you can use if your design requires more accuracy.
Here’s a block diagram of the MSPM0C110x microcontroller family:
A family block diagram of TI’s MSPM0C110x microcontroller shows the 24MHz, 32-bit Arm Cortex-M0+ processor, SRAM, Flash memory, with as many as 18 GPIO pins, a 12-bit ADC that has as many as 10 analog inputs, a 1-channel DMA controller, a watchdog timer, three additional 16-bit timers with 8-bit prescalers that can support as many as 14 PWM channels, an Arm-compatible debug port, and three serial ports (UART, I2C, and SPI). Image credit: Texas Instruments
The Arm Cortex-M0+ CPU runs at clock frequencies from 32kHz to 24MHz and supports Arm’s v6-M Thumb instruction set (little endian) including a 32-cycle, 32×32-bit multiply instruction. The processor also has a vectored interrupt controller with four programmable priority levels and tail chaining, used for setting up complex interrupt sequences. As you’d expect from a modern Arm processor, the Arm Cortex-M0+ supports multiple operating modes including run, sleep, stop, standby, and shutdown, which permit you to tailor the microcontroller’s power consumption to meet the demands of the running tasks. In run mode, the microcontroller consumes 87μA/MHz. In shutdown mode, the microcontroller consumes 200 nA and everything powers down including the SRAM (losing all the data stored in volatile memory) and the on-chip clocks. You force the processor to exit shutdown mode by asserting the external reset pin or the SWD pin, which is part of the Arm debug port.
Versions of this microcontroller have as many as 18 GPIO pins, a 12-bit ADC with as many as 10 analog inputs, a 1-channel DMA controller, a watchdog timer, three additional 16-bit timers with 8-bit prescalers that can support as many as 14 PWM channels, an Arm-compatible debug port, and three serial ports (UART, I2C, and SPI). In its maximal 20-pin package, the MSPM0C110x devotes 18 pins to I/O functions, leaving two pins for power and ground. Each I/O pin is heavily multiplexed and overlaid, with some pins having as many as six selectable functions. For example, the pin designated PA20, which is present even on the smallest 8-pad package, can serve as an analog input, a GPIO pin, the serial clock for the Arm-compatible debug port, one of several timer inputs, a bidirectional pin on the SPI port, or the serial input to the UART. Of course, you can select only one of these functions at a time, but the radical number of overlaid functions gives you a lot of design flexibility.
The microcontroller’s ADC supports 8-, 10-, and 12-bit conversions. The ADC will operate with an external reference voltage (VDD) or an internal one. Using VDD as the voltage reference, ADC runs at 1.2 Msamples/second in the 8-bit mode, 1 Msamples/second in the 10-bit mode, and 1.5 Msamples/second in the 12-bit mode. It runs more slowly when using its 2.5-volt internal voltage reference.
TI provides a fair amount of software development support for these microcontrollers. The MSPM0 LaunchPad board includes a maximally pinned out microcontroller on a board that costs $5.99. The MSPM0 Software Development Kit includes software drivers, middleware libraries, documentation, tools, and code examples. You can also use TI’s Cloud Tools to skip installation on a local PC. A GUI-based SysConfig utility allows you to configure the microcontroller’s peripherals. The utility then generates the code you need to configure the peripherals in your application software. TI’s MSP Academy is an online training resource for this microcontroller family. Of course, there’s a TI-supplied compiler as well as the GNU Embedded Tool Chain for Arm processors and support for the IAR Embedded Workbench and Keil MDK IDEs.
TI sells its MSPM0C1104 LaunchPad development kit for $5.99. Image credit: Texas Instruments
This cheap, low-end microcontroller isn’t designed for large processing tasks. You won’t be developing bumps in the cable for gigabit Ethernet applications, you won’t be processing voice or images, and you likely won’t be connecting this microcontroller directly to a Bluetooth or WiFi network. However, I can easily envision using these devices on the very edge of the network to connect, analyze, and fuse sensor data or to control some simpler actuators and perhaps even a motor or two. Truly, that’s a lot of capability for a 16-cent device.
References
Steve Leibson, A History of Early Microcontrollers, Part 1: Calculator Chips Came First
Steve Leibson, A History of Early Microcontrollers, Part 2: The Texas instruments TMS1000
Steve Leibson, A History of Early Microcontrollers, Part 3: The Rockwell Microelectronics PPS-4/1
Steve Leibson, A History of Early Microcontrollers, Part 4: The Intel 8048 and 8748
Steve Leibson, A History of Early Microcontrollers, Part 5: The Motorola 6801
Steve Leibson, A History of Early Microcontrollers, Part 6: The Fairchild F8 and Mostek MK3870
Steve Leibson, A History of Early Microcontrollers, Part 7: The Zilog Z8
Steve Leibson, A History of Early Microcontrollers, Part 8: The Intel 8051
Steve Leibson, A History of Early Microcontrollers, Part 9: The General Instruments PIC1650