What is microcontroller and how it works?
Components of a microcontroller
A microcontroller consists of different components in order to perform it's tasks smoothly. Some of these components are as follows:
RAM
Full abbreviation of RAM is Random Access Memory. Data and output are stored in RAM. These data are stored temporarily. Whenever, the power supply to the
microcontroller, the memory of RAM is lost. There is a special function register
(SFR) in RAM. There is a pre-configured memory called special functions register
(SFR) in RAM which is offered by the manufacturer of the microcontroller. Behavior of the serial
communication and analog-to-digital converter are controlled by it.
ROM
Full abbreviation of ROM is Read Only Memory. It stores special tasks of microcontrollers which can never be changed. ROM helps microcontrollers to understand that certain actions should trigger particular
responses. For example, ROM helps the microcontroller of television to understand
that pressing a channel button should change the display on your screen.
The program size which is stored on ROM depends on the ROM’s size. Some
microcontrollers accept ROM addition in the form of external chips while
others come with built-in ROM.
Program counter
Depending on a
series of different programmed instructions, a program counter assists the minicomputer for executing programs The program counter can keep tracking the counter’s place in the line of code by increasing the executed instruction one every time.
Inputs and outputs
Microcontrollers can interact with humans through
inputs and outputs in a special way. LED displays, temperature, humidity and light levels indicating switches and sensors are some of input and output devices on a microcontroller. A wide range of input and output pins or GPIO are configured for different input and output devices on a microcontroller. For
example, one pin configured as an input on the
microcontroller works by sensing temperature and another pin
configured as the output and connected to the thermostat triggers
the air conditioner or heater to turn on and off based on the pre-set
temperature ranges. Input and output dynamics are completely
machine-to-machine. There is no need of direct human interactions for taking any decision.
How does a microcontroller work?
A microcontroller receives data from its input/output (I/O) peripherals using its central processor and interprets the data. In this way. it controls a singular function in a device. Temporary data or information are stored in its data memory. In this scenario, the processor accesses it and uses instructions stored in its program memory for decoding and applying the incoming data. After then, it communicates and validates the appropriate action by using its I/O peripherals. Multiple microcontrollers can work together handling their respective tasks within a device. For example, we can say about a car. A car consists of many microcontrollers which can control various individual systems within, like the traction control, anti-lock braking system, fuel injection or suspension control by communicating with each other to inform the correct actions. Some are capable to communicate with a more complex central computer within the car and others can only communicate with other microcontrollers. In this case, they send and receive data using their I/O peripherals help to send, receive and process the data for performing their assigned functions.
Comments
Post a Comment