Are more bits better in an MCU? That’s similar to asking: are more cylinders better in an internal combustion engine (ICE)? Peripherals and other features matter, not just bits (or cylinders). For example, in the 1980s, Volvo offered a station wagon with a turbo-V4 engine that was faster off the line than Chevrolet Corvette with a much larger V8. Of course, the station wagon was toast once the V8 was wound up after a hundred yards. But the first hundred yards made a great visual for the Volvo commercials. In the case of MCUs, total power consumption, availability of peripherals, latency demands, and other factors are important, not just the number of bits.
MCUs are everywhere. They are found in cell phones, toys, vehicles, white goods, renewable energy systems, Internet of things (IoT) devices, and on and on. MCUs are essential for controlling hardware functions from motors to flashing LEDs. The basic architecture of MCUs includes a central processing unit, some memory, and peripheral functions (Figure 1). The MCU gets inputs from sensors, switches, and other devices and controls the function of peripherals such as drivers for displays, actuators, and motors, as prescribed with preprogrammed instructions. Depending on the complexity of the functions being controlled and the amount of processing needed by the various inputs, MCUs are available with 8-bits, 16-bits, and 32-bits. In general, the more bits, the more processing potential.
A ‘bit’ is a ‘binary digit.’ In an 8-bit MCU, data is stored in sets of 8 bits, called a byte (or, in some cases, an octet). An 8-bit memory register can store one of a possible 28 values. Depending on the integer representation used, the range of actual values differs. For example, with unsigned binary numbers, the range is 0 to 255 (28 minus 1), using a two’s complement representation, the range is -128 (-1 X 27) to 127 (27 – 1). While the data bus in an 8-bit MCU is 8-bits wide, the address bus widths can vary. Address bus widths of 12- to 16-bits are common. A 16-bit wide address bus, for example, results in a directly addressable memory space of 65,536 (216) bytes (called 64KB). But these classifications only begin to hint at the actual capabilities of specific 8-bit MCUs (Figure 2).
8-bit MCUs are versatile; they provide simple programming, energy efficiency, and small package sizes (some only have six pins). But these MCUs are not generally designed to implement networking and communications functions. Most common networking protocols and communications software stacks are 16-bits or 32-bits. Communications peripherals are available for some 8-bit devices, but 16-bit and 32-bit MCUs can often be a more efficient choice. Still, 8-bit MCUs are commonly used across various control, sensing, and interface applications.
More power with 32 bits
While 8-bit processors are versatile, they can be equally limited in performance. When 8-bits is insufficient, designers can turn to 32-bit MCUs that can pack quite a performance punch. 32-bit MCUs are used across a wide range of applications, and they can support high-end algebraic operations and floating-point mathematics. And while 8-bit MCUs are typically limited to several MHz of processing speed, 32-bit units are available with clock rates into the GHz range, although several hundred MHz units are more common.
That increased performance comes with the cost of increased programming complexity for 32-bit MCUs, including multiple status registers, complex interrupt management, multiple layers of firmware execution privileges, and so on. That’s part of what makes 32-bit units so powerful. They can quickly process thousands of complex calculations for applications that demand heavy data manipulation, such as image processing or real-time control of high-speed systems. In addition, the larger memory address space of 32-bit processors is often required to buffer high bandwidth data streams.
The higher clock speeds generally associated with 32-bit MCUs can also lead to increased energy consumption. In general, 32-bit MCUs can support more intense computation by trading off higher energy consumption. But the choice between 8-bits and 32-bits is not quite that simple. For example, a 32-bit MCU can complete a series of computations faster than an 8-bit MCU and then enter sleep mode for a longer time. So, is the 32-bit MCU more energy efficient? That’s possible, but not necessarily true. An 8-bit MCU can have lower overall energy consumption and contribute to longer battery life in portable devices. The choice is not simple, and the optimal energy consumption solution must be determined on a case-by-case basis.
There’s a middle ground
Returning to the ICE analogy, there’s a middle ground between 4 cylinders (8-bits) and 8 cylinders (32-bits); often, a 6-cylinder (16-bit) design can provide just the right combination of efficiency and performance. The performance of 8-bit MCUs is inherently limited and can only be improved within limits by adding peripherals. Systems using 32-bit MCUs offer higher performance but can be overkill and consume more power than alternative solutions.
That’s where 16-bit MCUs can come in; they can combine the simplicity of 8-bit units while providing enhanced performance without an excessive power penalty. Especially in applications that don’t need massive multi-threading and moderate memory needs, 16-bit MCUs can provide an optimal middle ground solution (Figure 3).
Peripherals can be the key. Some 16-bit MCUs have math co-processors that support intensive mathematical calculations, similar to some 32-bit units at the same clock speed. And, there are numerous communications stacks that support 16-bit MCUs. For example, with the correct implementation, Ethernet, controller area network (CAN), universal serial bus (USB), and Zigbee are among the communications protocols that can run efficiently on 16-bit MCUs. And the use of 16-bit MCUs can provide for simpler circuit board implementations compared with many 32-bit solutions.
Adding peripherals
The availability of peripherals and where they reside can be important factors driving the choice of 8-bits, 16-bits, or 32-bits. Adding an external communications peripheral to an 8-bit MCU can be an option. But, the addition of a peripheral chip can often eliminate the cost-benefit of using an 8-bit MCU. It can be less expensive to use a 32-bit unit with the communications functions already integrated. Moving up the scale finds 32-bit MCUs often include more features and can handle multiple peripheral functions more efficiently than 8-bit and 16-bit devices.
Applications that involve larger numbers and fast that calculations benefit from the use of 16-bit and 32-bit MCUs. Examples that can benefit from 16- or 32-bit MCUs include FFT calculations, high-quality audio or video, high-resolution image processing, and various edge computing applications. In addition, 32-bits are generally needed for machine learning and artificial intelligence implementations, often with application-specific accelerators.
On the other end of the complexity scale, processing analog signals from sensors or other sources does not necessarily benefit from using 32-bit or 16-bit MCUs. 8-bit MCUs can include built-in analog-to-digital converters (ADCs) that support 8-bit, 10-bit, 12-bit, and even 16-bit rates.
8-bit MCUs are available that can support some cryptographic functions for increased security. But those functions are often implemented in hardware that increases costs or software that places an increased burden on a relatively low-power processor. If higher-level security functions are important, it may be wise to use a 16-bit or 32-bit MCU.
Summing it all up – which MCU is best?
So, are more bits better? No, not necessarily. It’s a complex decision process (Figure 4). Successful designs identify the MCU architecture that delivers the needed performance in the most cost-effective manner. And for battery-powered devices, in the most energy-efficient manner.
Identifying the optimal MCU is not necessarily a simple question to answer. Sometimes, it is not just about today’s performance requirements; there may be a need to deliver a solution with growth potential to handle more challenging application needs as time passes. For example, security demands can constantly be evolving. The ability to adapt to the need for new or increased security functions in the future may be an important application consideration.
If a particular application requires a large amount of random-access memory (RAM), the use of a 32-bit MCU will generally provide much more RAM compared with 8-bit or even 16-bit devices. Latency is another factor to consider when comparing various MCU alternatives. Performing certain functions “equally well” with an 8-, 16- or 32-bit MCU may be possible. But if the application requires low latency, it may demand the speed of a 16- or 32-bit processor with a faster clock rate.
References
8-bit microcontroller summary, Microchip
8-bit vs. 32-bit MCU: Choosing the Right Microcontroller for Your PCB Design, Altium
IoT: choosing 8-bit vs. 32-bit MCUs, Lynnette Reese
MCU Basic Structure/Operation, Renesas
Leave a Reply