Microcontroller in Depth
What Is a Microcontroller?
- MCU in simplest means are Integrated Circuit (IC)
- MCU is a system on chip (SOC); a chip consists of several components. We’ll discuss these components
- MCUs are designed for embedded applications
Basically, a microcontroller comprises one or more following components:
- The central processing unit (CPU)
- Random Access Memory)(RAM)
- Read-Only Memory (ROM)
- Input/output ports
- Timers and Counters
- Interrupt Controls
- Analog to digital converters
- Digital analog converters
- Serial interfacing ports
- Oscillatory circuits
A microcontroller inside contains all structures essential for a computing system and functions as a computer without adding any outside digital parts in it. The maximum of the pins in the microcontroller chip may be made programmable by the user. A microcontroller has numerous bit handling commands that can be simply understood by the programmer. This is also accomplished to control Boolean functions. A microcontroller has a higher speed and performance. Better firmware security is being provided by an on-chip ROM structure in a microcontroller. This is too easy to design with low cost and small size.
The brain of a microcontroller is known as the CPU. It is accountable for fetching the instruction, decodes it, and then finally executed. It links all parts of a microcontroller into a single system. The primary function of the CPU is eye-catching and decoding instructions. The instruction made from program memory must be decoded by the CPU.
In a microcontroller, the function of memory is similar as a microprocessor. This is utilized to store data and programs. For storing program source codes, a microcontroller typically has a sure amount of RAM and ROM or flash memories.
Parallel input/output ports
These are generally used to drive or interface various devices for example printers, memories, LCD’S, and LED’S to a microcontroller.
Serial ports deliver many serial interfaces between a microcontroller and other peripherals like parallel ports.
Timers or counters are the most useful function of a microcontroller. There may be more than one timer and counters in a microcontroller. They deliver altogether timing and counting functions inside the microcontroller. The main jobs like modulations, clock functions, pulse generations, making oscillations, and frequency measuring are being done by this function. This also may be used for counting external pulses.
Analog to Digital Converter (ADC)
These are used for converting the analog signal to digital form. The input signal in this converter should be in analog form as a sensor output. The yield from this unit is in digital form. The digital output may be used for different digital applications such as measurement devices.
Digital to Analog Converter (DAC)
Digital to Analog Converter performs reversal operation of ADC conversion. It changes the digital signal into an analog format. It frequently used for controlling analog devices like DC motors, various drives, etc.
It is used for providing interruptions or delays for a working program. The delay can be external as activated by using an interrupt pin or internal as by using interrupt instruction during programming.
Special functioning block
Several microcontrollers are used only for some special applications for example space systems and robotics. These controllers hold additional ports to do such special operations. This reflected as a special functioning block.
We can find microcontrollers all around; every device that calculates, stores, controls, or displays information must have microcontrollers. From cell phones to smartwatches to ACs to washing machines to vehicles all are the applications of microcontrollers. We can also find microcontrollers inside keyboards, mice, modems, printers, and other peripherals. A microcontroller makes it easy to add types for example the ability to store measurements, to create and store user routines, and to show messages and waveforms. Further, the following are areas where MCUs are extensively being used:
- Used in biomedical instruments (Glucometers, blood pressure monitor)
- Communication Systems (Cell phones, routers, switches, answering machines)
- Automobile Industry (Vehicle suspension, braking, fuel injection, steering)
- IoT Application
IoT Architecture – Edge Computing
All the applications mentioned in previous slides can be implemented using just Raspberry Pi. Then why we should use a microcontroller that operates even without OS?
There are 3 reasons that push us to use MCUs:
- Low cost
- Low power consumption
- Real-time constraints
- A microcontroller act as a microcomputer deprived of any digital part.
- Usage is simple, easy to troubleshoot, and system maintenance.
- By way of the higher integration inside microcontroller decreases cost and size of the system.
- Immediately respond to any event that occurs.
- The maximum of the pins is programmable by the user.
- Got complex architecture than microprocessors.
- Perform a limited number of executions simultaneously.
- Typically used in micro-equipments
- Cannot perform heavy computations due to limited resources.