Electronic – What are the properties of an N-bit microcontroller

Architecturemicrocontroller

I've heard of 8 bit microcontrollers and 16-bit microcontrollers. I've even heard about 7 bit microcontrollers and 1 bit microcontrollers.

What are the general attributes of these groups? How do I choose which type to use for a project?

Best Answer

There are also 4-bit and 32-bit microcontrollers. 64 bit microprocessors are used in PCs.

The number refers to the register width. The registers are at the heart of the microcontroller. Many operations use registers, either to move data or to do arithmic or logical operations. These operations take place in the ALU, the Arithmetic and Logic Unit.

enter image description here

Some operations take only 1 argument, like clearing a register, or incrementing it. Many, however, will take 2 arguments, and that leads to the typical upside-down trousers representation of an ALU. \$A\$ and \$B\$ are the arguments, and the ALU will produce a result \$C\$ based on the current operation. A two-argument operation may be "add 15 to register R5 and store the result at memory address 0x12AA". This requires that there's a routing between the constant "15" (which comes from program memory), the register file and data memory. That routing occurs through a databus. There's an internal databus connecting the registers, internal RAM and the ALU, and for microprocessors and some microcontrollers an external databus which connects to external RAM. With a few exceptions the databus is the same width as the registers and the ALU, and together they determine what type of microcontroller it is. (An exception was the 8088, which internally has a 16-bit bus, but externally only 8-bit.)

4-bit controllers have 4-bit registers, which can only represent 16 different values, from 0 to hexadecimal 0xF. That's not much, but it is enough to work with the digits in a digital clock, and that's a domain where they're used.

8-bit controllers have been the workhorse of the industry for a couple of decades now. In 8 bits you can store a number between 0 and 255. These numbers can also represent letters and other characters. So you can work with text. Sometimes 2 registers can be combined into a 16-bit register, which allows numbers up to 65535. In many controllers large numbers have to be processed in software though. In that case even 32-bit numbers are possible.
Most 8-bit controllers have a 16-bit program counter. That means it can address maximum 64kBytes of memory. For many embedded applications that's enough, some even need only a few kBytes.
A parking lot monitor, for instance, where you have to keep count of the number of cars and display that on an LCD, is something you typically would do with an 8-bit controller. :-)

16-bit is a next step. For some reason they never had the success 8-bitters or 32-bitters have. I remember that the Motorola HC12 series was prohibitive expensive, and couldn't compete with 32-bit controllers.

32-bit is the word of the day. With a 32-bit program counter you can address 4GByte. ARM is a popular 32-bit controller. There are dozens of manufacturers offering ARMs is all sizes. They're powerful controllers often having lots of special functions on board, like USB or complete LCD display drivers.
ARMs often require large packages, either to accomodate for a large die with a lot of Flash, or because the different functions require a lot of I/O pins. But this package illustrates the possibilities ARM offers.

enter image description here

This is a 16-pin ARM in a package just 2.17mm x 2.32mm.