IoT: Choosing 8-bit vs. 32-bit MCUs

It’s generally known that 8-bit MCUs have an overall advantage over 32-bit MCUs in physical size, power efficiency, and cost. But do 8-bit MCUs have what it takes for IoT?

Do 8-bit microcontrollers fit in the Internet of Things? In 2015, 8-bit microcontrollers (MCUs) still held more than 35% market share of global microcontrollers, according to Allied Market Research.[i] On Mouser.com (an electronics distributor with a large selection), there are nearly triple the number of 8-bit MCUs to choose from compared to 32-bit MCUs. Clearly, 8-bit is not dying. There remains a very large selection of 8-bit MCUs offered by NXP, Microchip, Silicon Labs, Analog Devices, Renesas, Texas Instruments, Cypress Semiconductor, and several others. The 8-bit MCU has had a 30-year head start over 32-bit MCUs and is entrenched in existing embedded systems where control, not processing power, is the primary focus. While 16-bit MCUs remain in the picture, the extremes in specifications, features, and benefits are best observed in a comparison of 8- and 32-bit MCUs.

Figure 1: Venn diagram of the 8-bit MCU vs. 32-bit MCU benefits from a general perspective, as direct comparisons of all features combined are relative to tradeoffs. In general, the 8-bit MCU has been lower cost and smaller in size than the 32-bit MCU, but 32-bit MCUs are close to competing on cost and both have at least one “specimen” of a similarly minute physical size. In overall power consumption, the slower 8-bit MCUs will always trump the faster 32-bit MCUs as long as manufacturers stay on their game.

A little over a decade ago, 32-bit MCUs began their ascent to dominance as prices decreased while performance increased. These traits, combined with decreasing power consumption, have made the 32-bit MCU irresistible, enabling us to put 32-bit MCUs in everything from watches to refrigerators. The Internet of Things (IoT) is a deluge of smart, data-collecting, decision-making devices that contribute to an informed world; a world where we can more accurately predict anything that can be precisely trended. The IoT promises to improve productivity with more accurately aimed decision-making in several markets, including Automotive, Agriculture, Industrial, Healthcare, and Consumer devices. Supply chains will also reap rewards in the form of nimbler logistics, shorter time-to-market, reduced costs, increased employee (and personal) productivity, and more satisfying customer experiences.

IoT and the 8-bit MCUTo qualify as IoT, the most basic of devices need only include a secure processor, a cloud, and some means of communicating data over the internet. However, the low cost, low power consumption, and small physical size of the 8-bit MCU are still compelling in applications that predominantly require simple control code over processing power. A device that reads a few sensors and controls a process will suffice with an 8-bit MCU, even as an IoT application. (IoT is broadly defined, after all.) More sophisticated requirements that require high-performance, more memory and a larger number of I/O often require a 32-bit MCU or even a 64-bit processor. Some IoT devices have enough processing power to make local decisions, termed “edge computing,” which avoids sending massive amounts of raw data to the cloud.

Making the Choice between 8-bit and 32-bitIt’s generally known that 8-bit MCUs have an overall advantage over 32-bit MCUs in physical size, power efficiency, and cost. The project itself, or system requirements, will dictate what is necessary, but in a gray area concerning trade-offs between 8- and 32-bits, then either MCU is likely suitable. If you have the time to investigate your use cases, the MCU that could make life easier might show in the details. In that case, there are several areas to look at in determining what’s best for your system.

In Black and WhiteFirst, examine your system requirements in several areas. In some cases, it’s clear that an 8-bit MCU will suffice, especially if the final program can fit into less than 8 KB of memory, and budget dictates under 50 cents per unit. An 8-bit MCU will likely suffice if your system, along with code and data size, is small, and cost, physical size, and power consumption are large factors. An 8-bit MCU can be as small as Microchip’s (Atmel) ATtiny20-UUR at a package size of just 1.5 mm x 1.4 mm. Pushing up to 12MIPS at 12MHz, the ATtiny20 is IoT-ready with ultra-low power consumption at 200µA in active mode, 25µA in idle, and 0.1µA in power-down mode.[ii] In comparison, the 32-bit NXP Kinetis KL03 is not far off; at a small 1.6 mm x 2.0 mm in a WLCSP-20 package, the 48 MHz ARM® Cortex-M0+™ has “run power consumption as low as 50 µA/MHz.”[iii] Both have I2C and SPI. Amazingly, each is priced similarly. The non-monetary price for 32-bit performance works out to a physics problem: pushing more bits at 4x the speed consumes much more power. If battery life is a concern and you are in the gray area, you might find 8-bit MCUs irresistible.

Systems with a need for more I/O, larger programs (> 64KB of code), or larger data memory (> 256 KB) will gravitate beyond what 8-bit MCUs can provide. (Choices in 8-bit MCUs begin to thin out at a data memory size over 256 KB.) High-performance processing with math-intensive computations or a requirement for fast data manipulation belongs to 32-bit and higher.

Don’t forget to look at the simplicity factor. The simplicity of 8-bit MCUs has created a following; 8-bits is a lot easier to work with than 32-bits on several levels. Following the software and hardware on an integrated level at 8-bits is simpler than at 32-bits. Development tools can be a decision-maker in that free tools may not be available for a particular MCU. The cost of paid tools can be anywhere from a few hundred to a few thousand dollars per seat. Free, open source tools are worth checking out. The level of community and forum support for your MCU of choice may also have weight, depending on how much personal support you believe the manufacturer will provide. Documentation matters, as well, in terms of the frustration factor. If documentation is sparse, look for extremely active and supportive forums, otherwise, that should be a mark against an MCU in competition for your business.

SecurityAfter you have considered the above and you are still on the fence between 8-bit and 32-bit, determine what kind of security is needed. Security begins at the silicon. External security chips, if installed at all, are vulnerable at the connection point. What security options will you have for your IoT device? Ideally, it should be integrated into the silicon, such as ARM’s TrustZone®, which can simultaneously run a secure operating system (OS) and a normal OS on the same core. TrustZone is designed for protection over a wide span of assets. The 8-bit MCU may provide some cryptographic support in software or external devices, but external security hardware increases costs and security implemented in software creates the burden of extra overhead.

The Larger the System…Last, you can look at the finer details of processing, perhaps comparing latency if real-time is on your requirements list. Superiority in low-latency does not necessarily belong to 32-bit MCUs, however. The details depend on the use case. Issues like delays in an interrupt service routine of a larger system can become insignificant as execution time increases, as witnessed by Josh Norem of Silicon Labs, who did a comparison of an ARM core with an 8051. Norem states, “In keeping with the established theme, the larger the system gets, the less the 8051 advantage matters.”[iv] Norem’s fairly detailed comparison between a 32-bit ARM Cortex and an 8051 led Norem to find that in many cases, the detailed differences between the 8-bit 8051 and the 32-bit ARM-core MCU related back to overall system size: larger systems trend towards requiring 32-bit MCUs.

Before casting away the humble 8-bit MCU, however, make note that makers of 8-bit MCUs have not been twiddling their thumbs; over the past 30 years, many advances have been made to 8-bit MCUs. Today’s 8-bit MCUs sport advances in security, wireless connectivity, ultra-low power consumption, integrated features like analog-to-digital converters, modules, Analog Front Ends (AFEs), and other advanced features.

Microchip’s 8-bit PIC18F65K40 MCUs include Core Independent Peripherals (CIP), which bypass the processor to deal directly with other peripherals. According to Microchip, “Core Independent Peripherals are designed to handle their tasks with no code or supervision from the CPU to maintain operation. As a result, they simplify the implementation of complex control systems and give designers the flexibility to innovate.”[v]

Additional ConsiderationsThe 8-bit MCU moves fewer data at a time than the 32-bit MCU. Will you be moving a lot of data around? Does your natural data set size match the MCU data width, or will you be converting every line of 32-bit data for 8-bit consumption? Be aware that the 8-bit system is simpler to work with overall. Development tools play a part, but in general good tools are available for MCUs in both categories. The more complex 32-bit MCUs can handle more variations on peripherals, but with more features comes more complexity. Fewer moving parts are best for beginners, especially if you want to really get deep into how it all works together. Keeping your distance from the hardware with neat, well-behaved layers of abstraction is not always an option, however, so make complexity a deciding factor, all other things being equal.

It’s a good thing that the 8-bit MCU market doesn’t show signs of slowing down, as many maker-level (DIY) projects are very accessible to tinkering with just about everything at 8-bits (see Figure 3). The 32-bit MCU is probably a better choice for a certain class of IoT devices that process data before sending it to the cloud. The market is fluid, and 8-bit wins often for IoT devices that must sip power as a top priority, but nothing says that one 32-bit device cannot process the raw data from several 8-bit IoT devices locally before pushing it up to the cloud as an edge device.

In short, know your system requirements well, including the budgeted cost, the power budget in several MCU states, and how long the MCU might reside in each state. Have an idea of any physical size limitations, the level of security desired, and where the MCU will be spending most of its time: on control code/general processing or computational/math intensive processing? Security has become a concern in recent years as internet connectivity has opened the door to hacking, adding an additional burden in overhead for all MCUs. As for 8-bit MCUs powering IoT devices, it’s likely we will see more 8-bit MCUs as “accidental IoT” as some systems get implemented with remote communication via the internet for convenience.

Lynnette Reese is Editor-in-Chief, Embedded Intel Solutions and Embedded Systems Engineering, and has been working in various roles as an electrical engineer for over two decades. She is interested in open source software and hardware, the maker movement, and in increasing the number of women working in STEM so she has a greater chance of talking about something other than football at the water cooler.

According to a new market research report "Automation Testing Market by Technology (IoT, AI, and Big Data), Testing Type (Functional, Performance, Compatibility, and Security), Service (Advisory & Consulting, Managed, and Implementation), Endpoint Interface, and Region - Global Forecast to 2023", published by MarketsandMarkets™, the market size is expected to grow from USD 8.52 Billion in 2018 to USD 19.27 Billion by 2023, at a Compound Annual Growth Rate (CAGR) of 17.7% during the forecast period (2018-2023)....

The PIC16F15386 8-bit product family is a powerful microcontroller, ideal for designers seeking a product that provides an optimal balance between performance, power efficiency, functionality, flexibility and value.

Extension Media websites place cookies on your device to give you the best user experience. By using our websites, you agree to placement of these cookies and to our Privacy Policy. Please click here to accept.