Microcontroller a device which is fabricated inside every smart device today. It is like a mini computer which makes a device work according to the conditions. All modern automobiles contain at least one microcontroller depends on the requirements. Like a computer, it takes programming to work. In this article, we will know how it works like a computer.
What is a microcontroller?
A microcontroller is a mini computer which can control a device to perform a certain task. It is fabricated by VLSI which is known as very large scale integration technique. It is known as a mini computer because
- It can store the data with the use of RAM like a computer.
- It can process the data by a central processing unit.
- It can interact with other devices.
- It can control the speed of its processor by using an oscillator.
The only difference is that computers are made to do various tasks but a microcontroller is made to do a specific task for a device to work smartly.
Why the microcontroller comes in 4bit, 8bit, 16bit etc
The number of bits we use is specific to the functions of the device. The more bit we use, more number of registers include for doing your logical operations. In general, going from 8 to 16 to 32-bit microcontrollers means you will have fewer restraints on resources, particularly memory, and the width of registers. Bits also decides how many input and output ports make an interaction with the microcontroller.
For example, if you move to 16-bit that is actually 65,000 range and if you move up to 32 you’re in the 4.3 million range. So as you want to work on larger and larger numbers you actually need greater register widths.
What is inside the microcontroller?
- Central processing unit(CPU): Central is the part of the chip that carries out the code provided by software by performing the required computations.
- Random Access Memory)(RAM): RAM is the memory of microcontroller where it store to data to compute basically it is of 16kb to 32kb.RAM is made up of silicon.
- Read Only Memory(ROM): It has 8KB of Internal Program Memory (ROM) in the form of Flash Memory (ROM) and provide the option of reprogramming the memory.
- Input/output ports:It is available to interface with various devices such as LCD’S, LED’S, printers, memories, etc to a microcontroller.
- Timers and Counters: The timers and counters provide all timing and counting functions inside the microcontroller. It includes the functions like modulations, pulse generations, frequency measuring, making oscillations, etc.
- Analog to digital converters: It converts an analog signal into digital form. The input signal in this converter should be in the analog form (e.g. sensor output) and the output from this unit is in digital form.
- Serial interfacing ports: This will make an interruption in the circuit for making a time delay. The interrupt may be external or internal
- Oscillatory circuits: This crystal oscillator is used to generate clock pulses required for the synchronization of all the internal operations.