The Guide to Microcontrollers

Shop All Microcontrollers

What are microcontrollers?

In this guide, we’ll explore in a little more detail exactly what a microcontroller is, and how it fundamentally differs from related technologies like microprocessors. We’ll also look at some of the most common types of microcontrollers for sale on the market, and what other sorts of tasks you might be able to assign to them.

Put very simply, microcontrollers (often shortened to MCUs or MCs) are basically extremely small microcomputers that are entirely self-contained on a single chip.

To use even more basic terms, a you can define a microcontroller as a very simplified computer in and of itself - one that’s generally designed to just run a single basic programme over and over. In other words, a microcontroller is typically intended to perform a single automated task, as pre-programmed by the user/operator, in a single device - and to do this one job repeatedly (or, as is also common, on a timed loop).

This is what’s known as an ‘embedded application’, as opposed to the more versatile/general purpose applications handled by full microprocessors (also known as CPUs).

  • As we’ll see further on in this guide, microcontrollers do actually contain a microprocessor of sorts as one of their key components, but it’s typically a far less complex and dynamic form of CPU than most standalone MPs.

  • This is because the microcontroller unit as a whole is generally limited to performing a single highly specific job, and doesn’t need the full range of functionality that a proper microprocessor, such as you might find in a personal computer, offers.

In order to achieve this, a microcontroller generally works in conjunction with other types of components and electronic circuits, connected via printed circuit boards (PCBs). Through this combination of two or more items of PCB-based equipment, a microcontroller can be used to play a key role in controlling, monitoring and affecting various different sorts of systems and component behaviours.

Types of Microcontrollers

Although there are several dozen recognised manufacturing brands and programming architectures used for microcontrollers on today’s market, there are in fact just three distinct types of MCUs themselves in current use. The choice comes down to:

Microcontroller uses

Across an array of modern applications and industries, microcontrollers have quickly achieved widespread market penetration, and can be found today in all manner of different technologies and gadgets.

In fact, it’s not much of an exaggeration to say that more or less any electronic device containing a sensor, a display, a user interface and a programmable output control/actuator is very likely to feature an MCU as a key part of its workings.

Some of the more common applications and environments microcontrollers are currently used in might include:
  • Automation and robotics
  • Consumer electronics and domestic appliances (Everything from refrigerators, kettles, microwaves and washer-dryers to TVs, remote controls, electric shavers and phones)
  • Medical and laboratory equipment (Handheld diagnostic devices, scanners and X-ray machines, measuring/analysis and monitoring tools)

  • Automotive industries and vehicle control systems (Powertrain adjustment, multimedia consoles and navigation software)

  • Industrial and production environment controls (Heating and lighting, HVAC systems, safety locking mechanisms and more)


When installed as part of a functioning circuit in a particular device or system, a microcontroller can sense, monitor and respond to various events, behaviours or input signals that it detects from its surrounding environment (or from other components it’s connected to).

A particular MCU might commonly be programmed, for example, to push a specific type of output signal/behavioural control in response to certain input criteria. This could include the execution of such tasks as:

  • Illuminating an (O)LED display in response to touch-based user demand

  • Playing lights and sounds in temperature-sensing applications or other varieties of alarm/warning systems

  • Responding to the need for a motor to switch on or off in a pump or other mechanical device

  • Adjusting for tilt/balance/velocity in gyroscope- or accelerometer-based applications

Architectures


Although there are only three core types of microcontroller to choose from, as outlined very briefly above, within that field there exists a very diverse range of MCU manufacturer brands and architectures available.

Once again, as a very basic introductory guide, it’s far beyond the scope of this guide to delve into the precise differences between the different architectures and brands sold and moreover, you’re unlikely to be tasked with making professional microcontroller purchases if you aren’t au fait with any of the core builds and machine languages!

However, it’s worth noting that some of the more popular names users might frequently look out for include:

  • ARM core processors (many vendors supply ARM-based components, with ARM Cortex-M cores in particular being specifically targeted at microcontroller applications)
  • Microchip Technology Atmel AVR (8-bit), AVR32 (32-bit), and AT91SAM (32-bit)
  • Microchip Technology PIC, (8-bit PIC16, PIC18, 16-bit dsPIC33 / PIC24), (32-bit PIC32)
  • Freescale ColdFire (32-bit) and S08 (8-bit)
  • Intel 8051
  • PowerPC ISE
  • Renesas Electronics: RL78 16-bit MCU; RX 32-bit MCU; SuperH; V850 32-bit MCU; H8; R8C 16-bit MCU
  • Silicon Laboratories Pipelined 8-bit 8051 microcontrollers and mixed-signal ARM-based 32-bit microcontrollers
  • Texas Instruments TI MSP430 (16-bit), MSP432 (32-bit), C2000 (32-bit)
  • Toshiba TLCS-870 (8-bit/16-bit)

For more detailed information and advice on selecting or buying microcontrollers, processor and microcontroller development kits and any other types of semiconductor for professional or hobbyist uses, please feel free to contact a member of our customer support team by phone or email..

How do microcontrollers work?

As noted in the introduction to this guide, a microcontroller unit (MCU) is basically a very small computer entirely embedded on a single integrated circuit, otherwise known as a chip.

In this regard, a microcontroller is somewhat similar to a System on Chip (SoC), which is what you’d typically find powering a home computer, perhaps manufactured by Intel or AMD. However, a microcontroller is significantly less sophisticated than the average SoC (the latter often include one or more microcontrollers among their many core components).

Microcontrollers operate much like a very simple SoC, in that they can detect and react to external stimuli or conditions via any number of different communications protocols - these might include USB, touch response, environmental sensors, and many more besides.

When properly programmed by a user to react to certain inputs or signal detections, a MCU can be used to perform responsive behaviours across an enormously diverse array of functions and applications. These can range from simple input-output (I/O) triggers and component-control algorithms, right through to influencing additional component behaviour in much more complex fully integrated systems.

To attempt a full breakdown of exactly how a microcontroller operates would go beyond the scope of this introductory guide, which is more about sketching the very basics of what an MCU is/does. If you’re interested in learning how to programme and operate a microcontroller for specific tasks, you’ll find dozens of helpful guides online.

However, it’s worth knowing a little bit about the physical makeup of a microcontroller when you’re looking to understand how MCUs work, and especially in gaining a better understanding of the differences between MCUs and similar components such as microprocessors (MPs).

Because a microcontroller is effectively a simple mini computer embedded on a single integrated chip, it requires many of the same fundamental components as a larger and more complex ‘computer’ would do - namely:

  • CPU (Central processing unit)

    • Essentially the brain of the microcomputer, this component is a microprocessor which controls and monitors all the processes taking place inside the MCU

    • Responsible for the reading and execution of all logical/mathematical functions being performed

  • RAM (Random access memory)

    • Temporary storage used only when powered on, for helping to run and calculate the programs the MCU is told to execute

    • Continually overwritten while in use

  • ROM (read-only memory)

    • Pre-written ‘permanent’ memory that persists even without power

    • Essentially instructs the MCU on how to execute its programs when asked

  • Internal oscillator (the MCU’s main timer)

    • This component functions as the microcontroller’s core clock, and controls the execution rhythms of its internal processes

    • Much like any other sort of timer, they keep track of time as it elapses during a given process, and help the MCU to begin and end specific functions at specified intervals

  • I/O (input/output) ports

    • One or more communications ports, typically in the form of connective pins

    • These allow the MCU to be linked to other components and circuits for flow of input/output data signals and power supply

  • Peripheral controller chips (other optional accessories and components)

    • Dependent on the task the MCU is required to perform

    • These can be anything from various additional timers and counters to pulse width modulation (PWM) nodes, Analog-to-Digital Converters, Digital-to-Analog Converters, numerous data capture modules, further I/O options, and much more besides

All of these components, however, are much reduced in scope/capacity on a microcontroller than a comparable SoC in a personal computer. A MCU would commonly be found controlling basic behaviours in, say, a hairdryer or a calculator, but would offer pointlessly limited function in a more complex machine such as a full computer.

What is the difference between a microcontroller and a microprocessor?

Perhaps unsurprisingly, there’s often a good deal of confusion with regards to precisely what defines a microcontroller as opposed to a microprocessor (MP) or System on Chip (SoC).

The full answer is arguably somewhat more subtle, but - in a nutshell - a microcontroller is a simplified, single-task version of a SoC. Although a MCU technically contains a CPU/processor of sorts as part of its integrated circuit, it’s a much simplified version of one. This reduced-power microprocessor effectively functions as a simple CPU or ‘brain’ for the microcontroller unit, giving the MCU the basic ability to perform its single programmed role.

In terms of laying out the other key differences between a MCU and a MP, the easiest definition is to talk in terms of components. A true microprocessor does not contain any memory (RAM or ROM) or I/O ports, and can only operate as part of a wider system (for one thing, the instructions telling a standalone microprocessor how to execute a given function are generally stored externally). In a microcontroller, all these various components - including the simplified processor - are combined into a single self-contained unit.

Performance-wise, it breaks down something like this:

Microcontrollers

Microprocessors

  • Are an entire self-contained unit which contain a very simple CPU or microprocessor
  • Are used for a single specific application, as pre-programed by the user
  • Are not especially powerful in performance terms; typically they only draw a small amount of power, and contain little in terms of integrated data storage capacity
  • Need to be programmed by the operator in order to perform any meaningful role
  • Cannot operate outside of their specifically programmed remit (the code written for them - and the quality of it - will entirely define their performance)
  • Are generally meant for use in specific devices or appliances designed to perform one task repeatedly
  • Are much more complex and versatile in terms of function range, and intended for use in more general computing (as opposed to in specialised one-task devices)
  • Have much faster processor (‘clock’) speeds than MCUs, often measured in gigahertz (GHz) rather than Hz
  • Are highly challenging and very expensive to manufacture, unlike relatively simple and cheap microcontrollers
  • Require far more external components (RAM, I/O ports, data storage etc) in order to operate, none of which are integrated into the MP itself and must be bought and connected separately
  • Have a considerably higher power draw and are subsequently much less cost-effective to run continually
Again, a deep dive into the full range and impact of differences between each of these three component types is far beyond the useful scope of this basic guide. However, for a very simplified overview, the real distinction comes in terms of their respective bus widths - or, in layman’s terms, the width of their respective ‘data pipes’.

This, ultimately, is the key specification that limits a given microcontroller’s speed mathematical precision. In short, an 8-bit microcontroller will require an increased number of bus accesses and more instructions in order to perform 16-bit or 32-bit calculations, and therefore will arrive at the ‘answer’ (i.e. output behaviour) much more slowly than a 16- or 32-bit MCU.

In reality, a fully satisfactory answer to the question of differences between 8-, 16- and 32-bit microcontrollers would require a far lengthier explanation and a full glossary of terms for non-programmers. In computing terms, it’s effectively the same sort of limitation issue as you’d find with a ‘slow’ CPU rather than a ‘faster’ (more powerful) one, and this important criteria will impact the choice and scope of programming languages (such as C++, Python, R, Arduino etc) you’re able to comfortably use with a given microcontroller unit.

For those tasked with researching purchase options, it may suffice to note here that 8-bit MCUs have long been viewed as the most basic and cost-effective options, but with limited functionality in some applications. 16-bit and 32-bit microcontrollers are typically a good deal more expensive, but with performance gains to match.

Product spotlights

Click on the links below to browse the most popular brands of microcontrollers