- 0xduraki
A microcontroller functions similarly to a mini-computer and is designed to carry out one or a few specific tasks. It is small, energy-efficient, and perfect for direct device embedding. Everyday objects, including washing machines, drones, and smart thermostats, all have microcontrollers.
Each microcontroller is built with three main components:
A Microcontroller Unit (MCU) is not the same as Microprocessor Unit (MCU). These two kinds of processor chips are used in almost all electronic devices, but they serve different purposes:
CPU: As the microcontroller’s brain, the CPU retrieves and carries out memory-stored instructions. After retrieving and decoding instructions from memory, it performs the designated duties. The data and instructions that the CPU needs are stored in memory. The two types of memory that microcontrollers usually use are ROM, which saves the program instructions permanently, and RAM, which stores temporary data that the CPU may access fast while the microcontroller is operating.
I/O: The I/O ports, which support either digital or analogue signals depending on the model, enable the microcontroller to communicate with external devices. Timer and converters are examples of built-in peripherals that increase functionality.
A microcontroller needs to be programmed using a specific language before it can be used. After programming, the microcontroller carries out its assigned tasks and runs the stored instructions.
While there are many types of microcontrollers, here are a few popular ones:
Microcontrollers can control a vast range of electronic devices, especially in applications that require repetitive operations or fast computations. Here are examples of devices that microcontrollers commonly control: