Key Components
Which are the Key Components ?
A microcontroller, as we have already mentioned, contains a variety of components, including a CPU, RAM, and ROM.
1. Input Output Ports
Microcontrollers include a number of general-purpose input-output (GPIO) pins that can be configured as input or output pins by writing to certain configuration registers. These pins are referred to as input-output ports (I/Os). This pin can interact with the outside world by reading or writing HIGH or LOW states from or to its pins.
2. Program Memory, or ROM
Read-Only Memory is referred to as ROM. Flash memory was once programmable in older microcontrollers, which is why it is known as ROM. However, the most recent microcontrollers—EEPROMs—allow for reprogramming (Electrically Erasable Programmable Read Only Memory). The program or instructions that must be performed are stored in ROM.
3. RAM
RAM Random Access Memory is referred to as RAM. RAM is used to store data dynamically while the microcontroller is carrying out instructions, just like a computer would. Since it has a volatile memory, all of the data is lost when the power is turned off.
4. CPU
CPU is a computer's equivalent of the processor, which is made up mostly of the Arithmetical and Logical Unit (ALU), Control Unit, and Register Array. The arithmetic and logical operations of the information received from input devices or memory are carried out by the ALU, as its name suggests. A register array is made up of a collection of registers, such as accumulators (A), B, C, and D, that serve as temporary fast-access memory locations for data processing. The control unit, as its name suggests, regulates how information and instructions move throughout the system.