https://www.techtarget.com/iotagenda/definition/microcontroller
A microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system. A typical microcontroller includes a processor, memory and input/output (I/O) peripherals on a single chip.
Sometimes referred to as an embedded controller or microcontroller unit (MCU), microcontrollers are found in automobile engine control systems, robots, office machines, medical devices, mobile radio transceivers, vending machines and home appliances, among other devices. They're simple miniature PCs designed to control small features of a larger component without a complex front-end operating system.
A microcontroller is embedded inside of a system to control a single function in a device. It uses its central processor to interpret data it receives from its I/O peripherals. The information that the microcontroller receives is temporarily stored in its data memory, where the processor accesses it and uses instructions stored in its program memory to decipher and apply the incoming data. It then uses its I/O peripherals to communicate and take the appropriate action.
Microcontrollers are used in an array of systems and devices. Devices often use multiple microcontrollers that work together in the device to handle their respective tasks.
For example, a car has many microcontrollers that control various individual systems, such as the antilock braking system, traction control, fuel injection and suspension control. Each microcontroller communicates with the others to inform them of the correct actions. Some might communicate with a more complex central computer within the car, and others might only communicate with other microcontrollers. They send and receive data using their I/O peripherals and process that data to perform their designated tasks.
The core elements that make up a microcontroller are the central processing unit (CPU), memory and I/O peripherals.
Also known as a processor, a CPU is the brain of the device. It processes and responds to various instructions that direct the microcontroller's function. This involves performing basic arithmetic, logic and I/O operations. It also performs data transfer operations, which communicate commands to other components in the larger embedded system.
A microcontroller's memory stores the data that the processor receives and uses to respond to instructions it's programmed to carry out. A microcontroller has two main memory types:
The I/O devices are the interface for the processor to the outside world. The input ports receive information and send it to the processor in the form of binary data. The processor receives that data and sends the necessary instructions to output devices, which execute tasks external to the microcontroller.
While the processor, memory and I/O peripherals are the defining elements of the microprocessor, there are other elements that are frequently included. The term I/O peripheral refers to a supporting component that interfaces with the memory and processor. There are many supporting components that can be classified as peripherals. Having some manifestation of an I/O peripheral is elemental to a microprocessor because it is the mechanism through which the processor functions.
Other supporting elements of a microcontroller include the following:
Microcontroller processors vary based on the application. Options range from the simple 4-bit, 8-bit or 16-bit processors to more complex 32-bit or 64-bit processors. Microcontrollers can use volatile memory, such as RAM, and non-volatile memory types, including flash memory, erasable programmable read-only memory and electrically erasable programmable ROM.
Generally, microcontrollers are usable without additional computing components. They're designed with sufficient onboard memory, as well as offering pins for general I/O operations, so they can directly interface with sensors and other components.
Microcontroller architecture is based on the Harvard architecture or Von Neumann architecture. They offer different methods of exchanging data between the processor and memory. With Harvard architecture, the data bus and instruction are separate, enabling simultaneous transfers. With a Von Neumann architecture, one bus is used for both data and instructions.
Microcontroller processors are based on complex instruction set computer (CISC) or reduced instruction set computer (RISC). CISC generally has around 80 instructions, while RISC has about 30. CISC also has more addressing modes, 12 to 24 compared to RISC's three to five.
CISC is easier to implement and uses memory more efficiently, but it can have performance degradation because of the higher number of clock cycles needed to execute instructions. RISC places more emphasis on software and provides better performance than CISC processors, which emphasize hardware. CISC has a simplified instruction set and, therefore, increased design simplicity. However, because of the emphasis RISC places on software, the software can be more complex. Which one is used depends on the application.
When they first became available, microcontrollers only used assembly language. Today, the C programming language is a popular option. Python and JavaScript are also common microprocessor languages.
MCUs feature I/O pins to implement peripheral functions, such as ADCs, liquid-crystal display controllers, real-time clocks, universal synchronous/asynchronous receiver-transmitters, timers, universal asynchronous receiver-transmitters and USB connectivity. Internet of things (IoT) sensors that gather data such as humidity and temperature are also often attached to microcontrollers.
Microcontrollers can be classified according to data size and architecture. Common types include the following:
Microcontrollers use one of two architectures:
Examples of microcontroller models include the following:
Microcontrollers are used in multiple industries and applications, including in home and enterprise, building automation, manufacturing, robotics, automotive, lighting, smart energy, industrial automation, communications and IoT applications in business settings.
Basic areas where microcontrollers are used include the following:
The main difference between microcontrollers and microprocessors is in the level of functionality. Microcontrollers function on their own with a direct connection to sensors and actuators. Microprocessors are designed to maximize compute power on the chip with internal bus connections rather than direct I/O to supporting hardware, such as RAM and serial ports. Simply put, coffee makers use microcontrollers; desktop computers use microprocessors.
The distinction between microcontrollers and microprocessors has become less clear as denser and more complex chips have become relatively cheap to manufacture. This trend has let microcontrollers take on more general-purpose computer functionalities.
Microcontrollers are less expensive and use less power than microprocessors. Microprocessors don't have built-in RAM, ROM or other peripherals on the chip, but rather attach to these with their pins. A microprocessor is considered the heart of a computer system, whereas a microcontroller is the heart of an embedded system.
There are a few technology and business considerations to keep in mind when choosing a microcontroller for a project.
Many businesses focus on using low-cost microcontrollers. However, it's also important to consider speed, the amount of RAM or ROM provided, the number and types of I/O pins on an MCU, power consumption and development support. Be sure to ask questions such as the following:
Embedded system technology is crucial to the success of IoT. Learn more about how IoT and embedded systemst work together.
12 Aug 2024