Introduction
What is a microcontroller?
What is the difference between a microcontroller and a microprocessor?
Extended Reading
A microcontroller is a single-chip microcomputer that integrates the main components of a microcomputer into one chip. Microcontrollers are mainly used in automatic control devices, especially in automotive air conditioning systems and automated machinery. Their small size, low power consumption, and user-friendliness make them very popular in various industrial and civil embedded systems.
What is a microcontroller?
A microprocessor is a specific type of computer that shares key characteristics with all other computers (including personal desktop computers, mainframes, and microcontrollers). At the core of every computer is the CPU (central processing unit), which is responsible for executing programs. For example, when you are reading this article on a desktop computer, the CPU runs the web browser and retrieves the required program from the hard disk.
In addition to the CPU, computers also use RAM (Random Access Memory) to temporarily store data and variables during operation. They also contain various input and output devices to facilitate user interaction; for example, desktop computers use keyboards and mice as input devices and monitors and printers as output devices. The hard disk serves a dual role as an input and output device, allowing data to be read from and written to it.
Microcontroller
The desktop computer you use is classified as a “general-purpose computer” because it can run a variety of programs. In contrast, a microcontroller is called a “special-purpose computer” and is designed to perform specific tasks. Although there are differences, microcontrollers share several basic characteristics with general-purpose computers.
Microcontrollers are usually embedded in other devices and are therefore called “embedded controllers”. They execute specialized programs stored in ROM (Read Only Memory), which usually do not change. These controllers are usually designed to operate with low power consumption; for example, a desktop computer consumes about 50 watts from a wall socket, while a battery-powered microcontroller usually only requires about 0.05 watts.
These devices are usually equipped with specific input mechanisms and are often equipped with output display devices such as light-emitting diodes (LEDs) or liquid crystal displays (LCDs). Microcontrollers receive input signals from the devices they manage and respond by sending control signals to various components within these devices.
For example, in a television, the microcontroller processes input from the remote control, adjusts channels and manages speakers and display tubes accordingly. Similarly, in a car, the engine controller obtains input from sensors such as oxygen sensors and knock sensors to adjust fuel mixture and ignition timing. In a microwave oven, the controller interacts with the operation keyboard, displays information on the LCD and controls the relay that manages the operation of the microwave generator.
Block diagram of microcontroller
Microcontrollers are usually durable but face specific challenges in extreme environments. For example, an engine controller for a car must handle temperatures ranging from -34°C in Alaska to 49°C in Nevada. The temperature inside the engine compartment can reach 65-80°C. In contrast, microcontrollers used in simple devices such as tape recorders do not have such strict requirements.
Various processors act as microcontrollers. For example, the popular 8-bit Z-80 processor in home computers in the 1970s is used in devices such as Garmin GPS receivers. These devices have low-power Intel 80386 processors originally designed for desktop computers.
In products such as microwave ovens, where performance requirements are lower, cost is a priority. Manufacturers have developed dedicated microcontroller chips such as the Motorola 6811, Intel 8051, and Microchip's PIC microcontroller. These chips are simple and suitable for mass production.