Microcontrollers
A microcontroller is a programmable electronic device that is based on an integrated chip. It includes many of the components needed to make a control system. It can perform different functions autonomously, according to the program that's been implemented. From a computational point of view, a microcontroller is very similar to a microprocessor in that it has a Central Processing Unit (CPU) and executes control program instructions in data memory. It differs from a microprocessor, however, in its integrated functionalities. The main differences between microprocessors and microcontrollers are highlighted in the following table. The acronyms that are used are as follows:
- Electrically Erasable Programmable Read-Only Memory (EEPROM)
- Erasable Programmable Read-Only Memory (EPROM)
- Read-Only Memory (ROM)
- Random Access Memory (RAM)
- Arithmetic Logical Unit (ALU)
The differences between microcontrollers and microprocessors are as follows:
The microcontroller follows the von Neumann architecture, in which the memory is unique to the system and the data. Compared to a control system architecture built with microprocessors and peripherals, an equivalent architecture based on microcontrollers reduces a lot of the complexity of the circuit diagrams since many of the services such as memory and I/O are included in the basic functionalities of the microcontroller. In a microcontroller, all of the main units communicate with each other through a BUS made up of 4, 8, 16, or 32 bits. This indirectly provides a measure of the capacity of the microcontroller to process this information. A microcontroller like a microprocessor recognizes only one type of language, called machine language. This has control instructions that are written using the hexadecimal system, which is not very human-readable. For this reason, a more intuitive language called assembler is used. The assembler does not produce an executable file—just machine code.
Microcontrollers are used in systems such as the following:
- Alarm systems
- Automotive systems
- Electrical appliances (such as washing machines, ovens, and dishwashers)
- Distributor machines
- Control systems (such as temperature, pressure, and liquid level)
The main features of a microcontroller include the following:
- The management of a set of input and output lines.
- Being able to process the data acquired in a binary format according to a program installed in non-volatile memory.
- A timer, for the timing of the operations to be performed.
- Programming in the assembler. The assembler differs between the chip vendor.
- Programming in C and BASIC through specific libraries that are suitable to the microcontrollers.
Depending on the type and the number of integrated peripherals, the microcontrollers are divided into the following groups:
- Embedded microcontrollers
- Microcontrollers with external memory
- Digital Signal Processing (DSP)