The 8 bit MCU technology has been around for about half a century. These devices provide fast and easy deployment for small embedded projects. On the other hand, we have a more recent 32 Bit MCU technology, which has gained a lot of popularity. These devices offer almost everything, ranging from high processing power to rich peripherals, along with easy and fast development tools.
So which microcontroller to select? 8 bit or 32 bit?
When we select a microcontroller, we need to chalk down what our required specifications are. So let’s compare them both.
The 8, 16 or 32 bit basically defines the size of internal buses and registers of the microcontroller. So, an 8 bit MCU will have 2^8 (=256) bytes of addressable space while a 32 bit MCU will have 2^32 (=4294967296) bytes or 4GB of addressable space. Most 8 bit microcontrollers have 16-bit address line allowing them to have 2^16 (=65536) bytes or 64KB of memory. So more bits a microcontroller has, more memory you can address. If you application requires RAM or ROM size above 64K bytes, a 32-bit microcontroller is your only resort.
Each IO ports for a 32 microcontroller has 16/32 pins per port, unlike 8 pins per port for an 8-bit microcontroller. But this aspect is trivial and can be neglected as a benefit for small applications. But if you are looking out for more IO pins, 32-bit microcontrollers will serve you well. A typical 8-bit microcontroller will not have a pin count over 64 pins whereas 100-144 pin count is very common in a 32 bit MCU.
8-bit microcontrollers are relatively cheaper than their 32-bit counterparts. But the recent surplus supply and increasing competition within the 32-bit MCUs market has caused a plunge in their rates. Even though the price difference has reduced drastically over the previous year, a small difference in about 40-50 cents, can lead to higher profits when deployed in large numbers.
Ease of Development
8 Bit MCUs have an upper hand in case of ease of development. They have few registers to tweak with making the development process easy. For example, a typical 32-bit ARM device has a lot of clock settings for the core. These settings are required to be set before the MCU starts operating. This can be quite easy for 8-bit MCUs, where you can do around with just initializing the stack pointer, which takes about 4 lines of code (for example Atmel’s tinyAVR and megaAVR). But 32 bit MCU manufacturers are doing their best to decimate this stereotype and are coming up with default templates and libraries, making the development process simpler and faster. Just include these files in your project, and all initializations are taken care of.
32-bit microcontrollers provide incredible computation power as they have 32-bit registers. If you are programming in assembly language, the register-size limitation for an 8 bit MCU becomes very evident. For example, we want to add two 32 bit numbers on an 8-bit microcontroller. We will have to divide the number into parts of 8 bit and calculate them differently, making our code more complex. If we are programming in C, this will be largely opaque, but off course, the underlying compiled code will be much long for 8 bit. So 8-bit microcontrollers are not a prudent choice for an application involving high computations.
But many applications require little or no computation power. For example a home automation application, which receives data from a sensor or a user and operates a relay. For such application considering the cost and development ease, one may choose an 8-bit microcontroller.
Traditional 8-bit MCUs lacked more peripherals, limited by the addressable memory space. As you increase on-chip peripherals, the registers to control them need to be addressed in the same available memory. On the other hand 32-bit MCUs are rich in peripherals, providing multiple ADCs, DACs, multiple timers, dedicated hardware for communication etc.
There are a few exceptions of 8-bit MCUs which provide rich peripherals as well.
Considering power consumption while selecting a microcontroller depends upon its ultimate application. Like in the power electronic industry where I work, we deal with huge capacitors and resistances. A few milli-Amps here and there don’t make much a difference. Power consumption statistics are vital for battery operated systems. Saving few milliamps, may drastically improve the products battery life.
When talking about Power consumption, we need to consider two aspects: active power consumption and static power consumption. The amount of time the microcontroller will spend in active mode versus static mode contributes significantly to the overall application power budget. If your MCU application includes a larger sleep time, you need to emphasise more on static power consumption.
8-bit microcontroller architecture is known to consume less current as there are few leaky transistors. Moreover, this technology has been for over few decades and has seen a remarkable improvement in terms of power consumption. 32-bit MCUs, on the other hand, consume relatively more power, though it may be in terms of few milli-Amperes.
But with the advent of Cortex M0+ 32-bit microcontrollers, things are bound to change. This technology was introduced in 2012 and is considered to have the most energy-efficient ARM processor as of 2016.
Looking at the advantages of 32-bit microcontroller, comparing the two would be like comparing apples and oranges. But to our surprise, 8-bit microcontrollers still hold a major share in the embedded worlds. In fact, they dominated the microcontroller market until 2014. According to Gartner.com, the overall microcontroller revenue declined in 2015 due to weak demand of industrial and automotive electronics market. 32 bit MCUs saw a strong growth due to smart cards and broad-based IOT applications and exceeded the 8 bit MCU market for the first time.
In a market where 5 years be like a few generation old, why hasn’t this age old 8-bit MCU technology waned?
The answer has little to do with it being 8 bit. For many developers and engineers, it’s about familiarity and ease of development. They are well-acquainted with this technology and employing a different one may be risky for business. This is the reason why manufacturers employ 8-bit MCUs in household appliances like air conditioners, washing machines, refrigerators, and dryers. It’s why car manufacturers still use it in automatic windows, locking system, mirrors, seats and interior lightings. It’s why engineers and local manufacturers still use them for motor control and other countless low-end applications.
To cut it short, if you application requires more processing and faster execution, 32 bit should be your choice. If you system needs less computation power, along with lower cost and energy efficiency 8-bit MCUs can be preferred. Though trends are changing, and mostly every embedded developer and engineer is switching to the 32-bit world.
Note: these are the author’s opinions and may vary from person to person.