What distinguishes microcontrollers from microprocessors

Share your love

A look at extreme cases makes the differences clear: the tiny NXP Kinetis KL03 microcontroller with an edge length of 1.6 mm × 2 mm fits into the dent of a golf ball, the powerful AMD Epyc 7002 microprocessor is housed in a case the size of the palm of your hand. The KL03 costs less than 1 euro, has a single 32-bit ARM Cortex-M0 + processor core, clocks at 48 MHz and manages with 8 microwatts to 400 milliwatts. 32 KByte flash memory and 2 KByte main memory are built-in and it cannot control more RAM. The AMD Epyc is completely different with 64 64-bit cores, which connects up to 4 TB of RAM and 128 PCI Express lanes, but also burns 280 watts.

More from c't magazine

More from c't magazine

More from c't magazine

More from c't magazine

There is, however, a broad gray area in which the differences between microcontrollers and microprocessors become blurred. The former is also available with multiple cores that reach a clock frequency of over 1 GHz, with virtualization functions and a connection for external DRAM.

Conversely, some systems-on-chip (SoC) with x86 cores with a maximum of 6 watts and have typical microcontroller interfaces. A microcontroller is also called a micro controller unit (MCU) or, for short, µC, for a microprocessor there are the abbreviations Central Processing Unit (CPU) and Micro Processing Unit (MPU).

The fundamental differences between µC and CPU are on different levels. A CPU typically runs a feature-rich operating system that enables the installation and execution of many different programs (or apps), even at the same time (multitasking). The CPU processes thousands of running processes and threads very quickly, but it is seldom important that they run predictably to within a few milliseconds.

Read Also   Restriction on the Internet - Russia is blocking VPN providers

A microcontroller, on the other hand, usually only controls a few functions that are always the same, i.e. it processes more of a type of firmware. As the heart of a control system, a µC must perform calculations in a predictable time – in real time, as it were. The control unit of an internal combustion engine has to process measured values ​​from, for example, the crankshaft sensor, air mass meter and accelerator pedal into a signal for the injection nozzles within milliseconds.

Other applications are about “functional safety”: no program errors may occur in the controller of an anti-lock braking system or pacemaker. There are test regulations such as IEC 61508 or, for cars, ISO 26262 ASIL A to D (Automotive Safety Integrity Level).

The µC program code should therefore be as lean as possible and fit completely into the RAM; Virtual memory management and the helpful hardware unit (Memory Management Unit, MMU) are often superfluous or even disruptive. For simple tasks, microcontrollers can be programmed without an operating system.

However, modular µC operating systems optimized for certain areas of application are common, for example for real-time control tasks (Real Time Operating System, RTOS). Wikipedia lists more than 140 RTOS variants.

Flash memory for code and RTOS is built into many µC in order to save additional components. Microcontrollers for control tasks have an abundance of inputs and outputs: analog-to-digital (A / D) and digital-to-analog (D / A) converters, digital inputs and outputs (general purpose I / O, GPIO), Function blocks for pulse width modulation (PWM) as well as for standardized interfaces such as I.2C, SPI and UART, the latter often usable as RS-232 or RS-485.

Read Also   Today's Free Fire Codes September 7, 2021; all free rewards

A CAN bus interface is common for “automotive” µCs for vehicles. Many manufacturers combine a µC with additional function blocks to form an SoC, for example Espressif the ESP32 with WLAN unit for smart home and IoT devices.

Microprocessors tend to have few built-in I / O interfaces, but particularly powerful ones such as PCI Express, which manage data transfer rates of several gigabytes per second. In turn, a chipset is then often flanged on top of this, for example SATA, USB, SPI and I.2C ties.

Few instruction set architectures (ISA) dominate CPUs because (binary) compatibility with operating systems and software is important. Examples are x86 (AMD, Intel, VIA), ARM Cortex-A (Apple, Qualcomm, Samsung, MediaTek), IBM Power, MIPS and RISC-V RV64GC. With a µC, on the other hand, the function blocks optimized for certain areas of application are often more important than the computing kernel, of which there are many different ones such as ARM Cortex-M, Tensilica Xtensa (ESP32), Microchip / Atmel AVR (Arduino), PIC and 8051.

Less known are ARC, LatticeMico, NEC 78K, Renesas RL78, TI MSP430, RISC-V RV32I. A µC series often includes numerous variants, for example with different clock frequencies, SRAM and flash capacities, interfaces and additional functions, but also certified for different temperature ranges and industrial specifications. This specialization makes the µC offer very confusing. In addition, µC are integrated in many other chips: in WLAN, Ethernet, Bluetooth, USB adapters, in SSD and hard disk controllers, even in x86 CPUs from AMD and Intel, for example for a Trusted Platform Module (fTPM 2.0).

What distinguishes microcontrollers from microprocessors

What distinguishes microcontrollers from microprocessors

What distinguishes microcontrollers from microprocessors

In c’t 24/2021 we present our optimal PC 2022 to you. In addition to a detailed purchase advice, we describe two concrete construction proposals: an expandable, quiet all-rounder and a cheap mini-PC. We also tested music streaming services and looked at what 3D sound is good for. You will find issue 24/2021 from November 5th in Heise shop and at the well-stocked newspaper kiosk.

Read Also   Apple discusses mandatory vaccination for employees


(queue)

Article Source

Share your love