8-bit vs. 32-bit MCU

8-bit vs 32-bit MCU: Microcontroller Basics

An 8-bit microcontroller processes 8-bits of data at any particular time. The number of bits used by an MCU (sometimes called bit depth or data width) tells you the size of the registers (8 bits per register), the number of memory addresses (only 2^8 = 256 addresses), and the largest numbers they can process (again, 2^8 = 256 integers, or integers 0 through 255). An 8-bit microcontroller has limited addressing, but some 8-bit microcontrollers use paging, where the contents of a page register determine which onboard memory bank to use.

A 32-bit microcontroller can theoretically handle numbers reaching 2^32. They have 32-bit arithmetic logic units, registers, and bus width. In general, this means that a 32-bit can handle quadruple the amount of data, making it technically more data efficient. However, there are other differences between 8-bit and 32-bit microcontrollers that span beyond arithmetic operations.

Arithmetic Operations

One limitation should be obvious, which is the limitation on arithmetic operations. An 8-bit microcontroller would normally only allow arithmetic operations that output numbers ranging from 0 to 255 (or from -127 to 128), although a larger number can be shared between two threads. This introduces some programming complexity as threading does not happen automatically at the hardware level.

In general, using a microcontroller with a larger data width allows computation with larger numbers. A 32-bit microcontroller can handle unsigned numbers from 0 to 4,294,967,295 .

Form Factor in 8, 16, and 32-bit MCU Microcontrollers

If it sounds like a 32-bit microcontroller will always sit in a larger package than an 8-bit microcontroller, this is not always true. Some 8-bit, 16-bit, and 32-bit microcontrollers have the same form factor .

Two common MCU packages for 8-bit (left) microcontrollers and 32-bit (right) microcontrollers.

Embedded Software and Memory Usage

At the software level, the data types used in your code will also determine which type of microcontroller to use. For example, an unsigned integer declared in an 8-bit microcontroller will only consume 1 byte. The same variable in a 32-bit microcontroller consumes 4 bytes of data. You might say “wait, a 32-bit MCU has 16 million times as many addresses, what do we care if it uses 4 bytes?” The maximum number of available unique addresses says nothing about the actual amount of memory placed on an MCU’s microcontroller. On-chip memory is usually at the KB level, so the amount of data required in your code matters.

Deciding between an 8-bit vs 32-bit microcontroller involves more than the data width alone.

Speed and Memory

One of the primary advantages of a 32-bit microcontroller over an 8-bit microcontroller is its superior processing speed. A typical 8-bit microcontroller usually runs at 8 Mhz while a 32-bit microcontroller can be clocked up to hundreds of Mhz. You might not notice the embedded data processing speed difference if you’re using the microcontroller to turn on a mechanical relay; however, it quickly becomes obvious when you’re running applications that require heavy data processing applications. For example, a door access controller that processes thousands of transactions per day requires a 32-bit microcontroller processor.

8-bit microcontrollers are cheap and easy to work with. In fact, they are still very popular after four decades in many applications. But if you’re working on a product that requires a huge internal Random Access Memory (RAM), then you may have to replace the 8-bit with a 32-bit. 32-bit microcontrollers often have 8 times more RAM than their 8-bit peers. If you need to a huge buffer to store audio data, then a 32-pin microcontroller is the better processor application option.

Get a 32-Bit MCU microcontroller if your design can’t live without speed.

Adding Peripherals

The basics of embedded system design involve creating a list of required peripherals based on project requirements. If you require Ethernet, Universal Serial Bus (USB Stack), multiple universal asynchronous receiver-transmitter devices (UARTS), and a Controller Area Network (CAN) bus, an 8-bit microcontroller would be insufficient. You might have to consider adding peripheral chips, which may cost more than a 32-bit microcontroller alone.

Generally, 32-bit microcontrollers are feature-packed compared to 8-bit microcontrollers. With superior processing speed, a 32-bit microcontroller can handle multiple peripherals efficiently. However, bear in mind that 32-bit microcontrollers consume more power, especially when all embedded systems and peripherals are turned on.

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.

Clock Speed

When we talk about the difference between microcontrollers, the data processing speed is a big factor to consider. In a microcontroller, data is processed in a particular time frame and the time it takes to process this data is dependent upon the Crystal Oscillator and depending upon the microcontroller type it can be an internal or external clock. 1Mhz crystal is equal to 1000000 cycles/second. So,1 cycle is an execution of 1 instruction or data processing. The 8-bit and 16-bit microcontrollers are supported up to 40-64Mhz of the crystal, where a 32-bit microcontroller can support >100Mhz crystal. Which makes the 32-bit microcontroller a more time-efficient microcontroller. But there is also a drawback, that is more clock speed is equal to more power consumption.

Hardware Design and Learning Curve

It’s fair to say that a PCB with a 32-bit microcontroller, which usually has over 100 pins, is more complex than an 8-bit microcontroller, which rarely exceeds 30. Assembly-wise, soldering a SOIC package is definitely easier than a Quad Flat Package (QFP) or a Ball Grid Array (BGA) package. There are also fewer quality issues with wider pitches on a SOIC package. If an 8-bit microcontroller device is sufficient for your project, do not choose a 32-pin microcontroller. Otherwise, use pre-built footprints in PCB design software to minimize your design time.When you search MCU programming tutorials for microcontrollers, you’ll find that most tutorials stick to 8-bit microcontrollers like 8051 or Arduino, a popular 8-bit-based microcontroller board. This is because it is easier to get started with an 8-bit microcontroller. A 32-bit microcontroller has a more complex architecture and demands a longer time for familiarization. If you’re creating a simple code production counter, it’s not cost-efficient to ask the firmware engineer to explore microcontrollers for a week when he can set up the entire firmware for much cheaper using an 8-bit microcontroller.

32-bit Microcontroller Applications

There are plenty of applications for a 32-bit microcontroller, but this should be a discussion regarding when not to use a 32-bit microcontroller. In general, any application that requires computations that inevitably involve large numbers and that must be calculated faster should use a 16-bit or 32-bit microcontroller. Some example operations include FFT calculations, image processing, high-quality audio or video, and edge computing applications. Some memory and processing-intensive tasks involving machine learning or AI are better implemented with something more powerful, such as an ARM MCU or a single-board computer.

If you need to gather measurements of analog signals, a 32-bit microcontroller is not necessarily better than an 8-bit microcontroller. The bit depth quoted for a microcontroller is not equivalent to the bit depth of the built-in analog-to-digital converter (ADC). Commercially available microcontrollers will include an onboard ADC that reaches 8-bit, 10-bit, 12-bit, or 16-bit rates.

For mobile applications, a 32-bit microcontroller will provide more intense computation at the expense of higher power consumption. It’s possible to use a 32-bit microcontroller to finish important computations faster and then put the CPU in sleep mode for a longer period of time. However, this does not mean a 32-bit microcontroller is more power efficient. An 8-bit microcontroller will generally provide longer battery life and have a better balance of peripheral features than similar 32-bit devices.

Choose the Best MCU for Your PCB Design

To choose the best microcontroller for your PCB design while minimizing time and overall cost, it is necessary to carefully assess the key advantages and disadvantages of an 8-bit vs a 32-bit microcontroller. By taking design requirements like speed, complexity, peripherals, and flash memory into consideration, you can minimize decision paralysis as well as potential setbacks when choosing the best microcontroller for your design.

Are more bits better?

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 . 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.

MCUs consist of three basic elements, the central processing unit (CPU), memory, and peripheral functions.

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 .

8-bit processors can offer a wide range of performance capabilities.

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

there’s a middle ground between 8-bits and 32-bits ; often, a 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.

 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.

16-bit MCUs with specialized peripherals for motor control, digital power conversion, low-power battery-powered designs, advanced analog integration, and hardware safety can offer performance enhancements compared to 8-bit devices.

Summary

So, are more bits better? No, not necessarily. It’s a complex decision process. 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.

8-bit vs. 32-bit MCU comparison: 8-bit devices will almost always be lower power than 32-bit designs, and while 8-bit units can be lower in cost, that is not always true. The choice is complex and depends on many application-specific requirements. In some cases, a 16-bit MCU can be an optimal choice.

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.

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started