What is Microprocessor and Microcontroller?

The microcontroller and microprocessor is the brain and core component of an embedded system. It serves as the central processing unit (CPU) and is responsible for coordinating and controlling the various components and processes within the embedded system, enabling it to perform its designated functions/tasks reliably and efficiently and executing instructions, controlling hardware peripherals, and managing the overall operation of the system.

The choice of microcontroller or microprocessor depends on factors such as the complexity of the application, performance requirements, power consumption considerations, type of interfaces, and cost constraints.

Different microcontrollers or microprocessors may have varying capabilities, architectures, instruction sets, peripherals, GPIO (General purpose input output) count, the current drive capability of the pins, clock speeds, and memory capacities. As a designer, you select the most suitable option for a specific embedded system application.

In this blog post you will understand the basic internal architecture of Microprocessor and Microcontroller and a brief comparison of microprocessor vs microcontroller.

What is Microprocessor (MPU)?

A microprocessor is a programmable electronics chip that has computing and decision-making capabilities similar to a central processing unit of a computer.

A typical microprocessor consists of an arithmetic and logic unit (ALU) in association with a control unit to process the instruction execution. A simplified block diagram of the microprocessor is shown below:

As we can see in the above block diagram microprocessor (MPU) contains only a processing unit for processing and computing. To make use of a microprocessor, one needs extra hardware chips such as memory (RAM/FLASH), peripheral boards, expansion buses, communication ports, etc. It means that MPU cannot work stand-alone. 

Internal Architecture of Intel 8085 Microprocessor (MPU):

The Intel 8085 is an 8-bit microprocessor developed by Intel Corporation in the late 1970s. It was one of the popular microprocessors of its time and played a significant role in the early days of personal computing.

What is Microcontroller (MCU)?

A microcontroller is a compact, self-contained integrated circuit (IC) that combines a CPU core with additional components such as memory, input/output peripherals, timers, and required peripherals.

It is designed to perform specific tasks within embedded systems, which are computer systems dedicated to performing specific functions. As it is a specific applications-focused chip, it has limited processing power, memory, and peripheral signal chip to achieve specific functions. Hence are cost-effective solutions for embedded hardware design.

A simplified block diagram of the microprocessor is shown below:

microcontroller block diagram

Internal Architecture of Intel 8051 Microcontroller (MCU):

The 8051 microcontroller was designed by Intel in 1981. It is an 8-bit microcontroller typically available in a 40-pin Dual Inline Package (DIP), which is a common packaging format for integrated circuits.

It has 4 kilobytes (4KB) of ROM storage for program memory and 128 bytes of RAM storage for data storage during program execution. It has two 16-bit timers and an on-chip crystal oscillator of a typical frequency of 12 MHz.

The 8051 microcontroller has found widespread use in various applications due to its simplicity, versatility, and availability of development tools and resources. It has been used in industrial automation, consumer electronics, automotive systems, home appliances, and embedded systems.

  Intel 8051 microcontroller Architecture

Microprocessors Vs Microcontrollers

Also read : How to Select Microcontroller and Microprocessor for Your Design?

Microcontroller (µC) Brief:

  • Contains a processing unit along with a small amount of memory (ROM, RAM, etc.).
  • Includes a few I/O ports for peripherals, timers, and other features.
  • Often considered a mini-computer due to its self-contained nature.
  • Generally used as a System-on-Chip (SoC) for embedded systems.
  • Cost-effective and compact compared to microprocessors.
  • Examples include the ARM Cortex-M series and Intel 8051.
  • Commonly used in home appliances like washing machines, ovens, and so on.

Also Read : Microcontroller Types 

Microprocessor (µP) Brief:

  • Contains only a powerful processing unit without integrated memory or other components.
  • Requires additional hardware chips, such as memory (RAM), peripheral boards, and system buses.
  • It cannot function as a stand-alone unit and relies on external components.
  • Typically used for general-purpose computing tasks.
  • Examples include the ARM Cortex-A series and Intel Pentium series.
  • Found in desktop computers, laptops, other high-end security devices, servers, and anywhere to meet the demands of high-performance computing across a range of applications.

Major Differences Between Microprocessor & Microcontroller

Based on the above understanding here are the high-level points on microprocessor vs microcontroller:

microprocessor vs microcontroller

The choice between a microprocessor vs microcontroller depends on the specific needs and requirements of the system being designed.

Microcontrollers are favored for embedded systems that require specialized and customized tasks, while microprocessors are commonly used in devices that require general-purpose computing capabilities. It’s essential to consider the intended application and functionality when deciding which type of chip to use.

What is the Functionality of Microprocessor & Microcontroller?

As stated, MPU/MCU interacts with other components of the embedded system, such as sensors, system memory, actuators, and communication interfaces, to carry out the desired tasks.

Here are some key points about the role and functionality of the MPU/MCU, like Execution of firmware/software/ Instructions, Memory Management. System Operation, Peripheral Communication, etc.

Execution:

The microcontroller or microprocessor carries out the firmware/software instructions that are stored in its memory (ROM/Flash). These instructions determine how the embedded system behaves and what functionalities it performs. Think of these instructions as a set of tasks that the system needs to accomplish.

let’s understand an example of an HVAC (heating, ventilation, and air conditioning) system. In an HVAC system, the instructions may include tasks like reading data from remote sensors to gather information about the ambient temperature, processing input signals, and passing it to the Thermostat and then to cooling or heating components.

The remote sensors collect temperature data from the environment and transmit it to Thermostat, which has a microcontroller (MCU). The MCU, which serves as the brain of the system, receives the temperature data and performs calculations to determine the appropriate actions.

The Thermostat then sends commands (on the calculated temperature) to a different module of the system to adjust the settings of the air conditioning system. These modules receive the commands and control the air conditioning system accordingly. It may turn on or off the cooling or heating components, adjust fan speed, or regulate other parameters to maintain the room temperature at the desired set point.

By executing the firmware or software instructions, the MPU/MCU enables the embedded system to continuously monitor and respond to changes in temperature, ensuring optimal comfort and energy efficiency in the room.

The combination of sensors, microcontrollers, and actuators allows the embedded system to intelligently control the air conditioning system based on real-time data, providing a comfortable environment for the occupants.

Memory Management:

Memory management is an important aspect of embedded systems, and it involves the management of various types of memory resources. In an embedded system, the MPU or MCU is responsible for managing memory resources. This component handles different types of memory, including program memory and data memory.

    • Program memory, also known as firmware or software instructions memory, is where the executable code of the embedded system is stored. It contains the instructions that the processor executes to perform specific tasks. Common types of program memory in embedded systems include FLASH memory and ROM (Read-Only Memory).
    • Data memory, on the other hand, is used for storing variables, data structures, and temporary data during program execution. It includes both volatile and non-volatile memory. Volatile memory, such as SRAM (Static Random Access Memory), provides fast access to data but loses its contents when power is removed. Non-volatile memory, such as EEPROM (Electrically Erasable Programmable Read-Only Memory) or Flash memory, retains its data even when power is lost.
    • The memory resources, such as SDRAM (Synchronous Dynamic Random Access Memory), SRAM, FLASH, EEPROM, etc., are interfaced with the MPU or MCU using defined memory mapping schemes. Memory mapping is the process of assigning physical addresses to different memory locations. It allows the processor to access the required memory locations efficiently.
    • Efficient memory management is crucial in embedded systems to optimize performance and functionality. It involves strategies like memory allocation, deallocation, and memory optimization techniques to ensure that memory resources are utilized effectively. By managing memory efficiently, the embedded system can operate smoothly and effectively execute its tasks.

System Operation:

MPU/MCU manages the overall operation of the embedded system. It handles tasks such as task scheduling, interrupt handling, and resource allocation. It ensures that different interfaces and peripherals of the system work together harmoniously and perform their designated functions.

    • Task Scheduling: In an embedded system, there are typically multiple tasks or multi processes that need to be executed. The MPU/MCU manages the scheduling of these tasks, deciding which tasks to prioritize when they should run, and for how long. It ensures that tasks are executed in a timely and organized manner based on priority levels or predefined scheduling algorithms.
    • Interrupt Handling: Interrupts are signals generated by hardware or software events that require immediate attention from the MPU/MCU. A few examples may be a keypad button press, sensor input, or any time-based event. The MPU/MCU is responsible for handling interrupts by suspending the current task, servicing the interrupt, and returning to the interrupted task seamlessly. Interrupt handling allows the system to respond quickly to critical events.
    • Resource Allocation: The MPU/MCU manages the allocation of system resources, such as memory, processing power, input/output (I/O) devices, and communication interfaces. It ensures that resources are utilized efficiently and fairly among different tasks or processes. The MPU/MCU may employ various algorithms to allocate resources effectively, considering factors like task priorities and system constraints.
    • Interface and Peripheral Management: Embedded systems often interface with various peripherals and external devices, such as sensors, actuators, displays, communication modules, and more. The MPU/MCU facilitates the interaction between the system and these peripherals. It manages the configuration, control, and synchronization of these interfaces and peripherals, ensuring they work harmoniously and perform their designated functions.

By managing these aspects of system operation, the MPU/MCU acts as the control center of the embedded system, orchestrating the execution of tasks, handling events, and coordinating the use of system resources. This allows the system to operate effectively, meet its requirements, and deliver the desired functionality.

Peripheral Communication:

The microcontroller or microprocessor establishes communication with a wide range of peripherals, sensors, input devices (such as keypads), output devices (such as displays), actuators, and communication modules.

It acts as a bridge between the embedded system and the external world, facilitating the exchange of data, control signals, and synchronization with these external devices.

By managing various communication interfaces like UART, SPI, I2C, Ethernet, USB, and more, the microcontroller or microprocessor enables seamless data exchange and interaction with the outside world.

This allows the embedded system to receive inputs from sensors or user inputs, process the data, and generate appropriate outputs or responses through actuators or displays.

The peripheral communication capabilities of the microcontroller or microprocessor greatly enhance the functionality and versatility of the embedded system, enabling it to interact with and respond to its environment effectively.

Real-Time Operation: 

MPU/MCU components may include a real-time operating system (RTOS) or real-time capabilities to ensure the timely and deterministic execution of tasks. Real-time systems require precise timing and responsiveness, making them suitable for applications such as control systems, robotics, and automation.

Conclusion

Overall, Microcontroller or Microprocessor acts as the brain of the embedded system, providing the necessary processing power for executing instructions, managing memory, and overseeing the overall operation.

Its capabilities and features are carefully selected based on the requirements of the specific embedded system, ensuring efficient and reliable performance.

Author Profile

Vikky K
20+ years embedded hardware design professional with a burning passion for teaching. Sharing the intricate world of embedded hardware is my mission and joy.

Leave a Comment