Microcontrollers are the building blocks of any digital signal processing system. In layman’s terms, they can be described as miniature computers that are present on chips. They consume very little amount of power and are self sufficient. They are similar to microprocessors but contain some additional elements such as read only memory in the form of EEPROM (Electrical Programmable Read Only Memory) and a read write memory that usually utilises flash technology.
Another difference between microcontrollers and microprocessors is the clock speed. Microcontrollers usually operate at low clock speeds. Low clock speeds are adopted as they are suitable for the operations that are usually performed using microcontrollers. Also, this ensures that they consume less power.
Usually, when they are not used for a particular period of time, they hibernate and need certain events such as a button press in order to get them working again. There are primarily used in devices that have been designed to work automatically for example, certain systems in cars, the various signal processors, remote controls etc.
Usually the microcontrollers lack a proper user interface. Some of them do not have one at all. Hence, they cannot be used in isolation and are usually combined with various other devices to make them user-friendly.
All the components of the microcontroller are present on a single chip. Thus, the cost of the single chip goes up. However, as only one chip, the overall cost is reduced. This also reduces the labour that is required in manufacturing the device.
A typical microcontroller will have the following components:
- A central processing units that consists of simple (4 bit) or complex (28 or 32 bit) processors.
- Particular bits are present in the microcontrollers that define the state (input or output) of every pin.
- Serial ports are present to perform input and output operations. Other input or output interfaces are connected to these ports.
- Other devices such as timers also may be connected to the microprocessor.
- A clock is also present within the microcontroller. If no external clock is connected to it then, the above-mentioned clock is used to time the various operations.
- It has a volatile memory (usually flash) to store the temporary data. Apart from it, a permanent memory is present as well.
- It may contain an analogue to digital converter.
- It contains mechanisms that support debugging of programs.
In some microcontrollers, Harvard architecture is used which makes use of separate buses for transfer of instruction. This makes simultaneous transfer of data and instructions possible. When such architecture is used, the length of the instruction is different from the size of the general purpose registers present in the microcontroller.
Various programming languages are used for different microcontrollers. These are together termed as assembly language. The programs are written in this language then, they are assembled (converted into binary code) and then, they are transferred onto the microcontroller where the code is stored in the read only memory.
Microcontrollers have revolutionized technology and have made possible the automation of many things that was earlier believed to be impossible.