2103130 Umor Faruk Microprocessor Microcontroller Assignment.pdf
2103130 Umor Faruk Microprocessor Microcontroller Assignment.pdf
Introduction
Microprocessors and microcontrollers are fundamental components of modern
embedded systems and computing devices. While both play crucial roles in processing
data and executing instructions, they differ significantly in structure and application. This
assignment provides a comprehensive comparison of microprocessors and
microcontrollers, highlighting their architectural distinctions and programming
differences using assembly code examples.
Microprocessor
A microprocessor is a central processing unit (CPU) on a single integrated circuit that requires
external peripherals, such as RAM, ROM, and I/O devices, to function. It is designed for
general-purpose computing and is widely used in personal computers, servers, and high-
performance computing systems. Microprocessors handle complex tasks, multitasking, and high-
speed operations due to their powerful architecture and high clock speeds.
Microcontroller
A microcontroller, in contrast, is a compact integrated circuit that includes a CPU,
memory, and I/O peripherals on a single chip. It is designed for specific tasks within
embedded systems, such as controlling devices in automotive, industrial, and IoT
applications. Microcontrollers are optimized for low power consumption and real-time
processing, making them suitable for dedicated applications requiring efficiency and
simplicity.
Structural Comparison
Definition
Comparison
Table
Feature
Comparison Microprocessor Microcontroller
CPU only; requires external memory & CPU, RAM, ROM, I/O on a
Components
Table I/O single chip
Power High Low
Consumption
Processing
Higher Moderate
Speed
Cost Expensive Cost-effective
Computers, servers, high-performance Embedded systems, IoT,
Applications
systems automotive
Memory Type External RAM, ROM Internal Flash, SRAM, EEPROM
Peripheral Built-in peripherals (ADC,
Needs external interfaces
Control timers)
Power
Less efficient Optimized for low power
Efficiency
Complexity More complex hardware setup Simplified design
Clock Speed Higher (GHz range) Lower (MHz range)
Instruction Set CISC (Complex Instruction Set) RISC (Reduced Instruction Set)
Multitasking More capable Limited
Boot Time Longer Quick startup
Programming Requires OS support Works with direct firmware
Interrupt Simpler and faster
More complex
Handling
Structural Diagrams
Microprocessor Architecture:[
1]
Microcontroller Architecture:[2]
.model small
.stack 100h
.data
.code
main proc
mov ds, ax
int 21h
Explanation:
• Loads the data segment.→ mov ax, @data, mov ds, ax (Initialize data segment).
• Loads the first number into AL. → mov al, num1 (Moves 05H into AL).
• Performs addition. → add al, num2 (Adds 03H to AL, result in AL).
• Stores the result.→ mov result, al (Saves the sum in result).
• Terminates the program.→ mov ah, 4Ch, int 21h (Exit to DOS).
Explanation:
Applications:
Advantages:
8051 Microcontroller
Applications:
Advantages:
Conclusion
Microprocessors and microcontrollers serve distinct purposes in computing and
embedded systems. Microprocessors offer high computational power but require
external peripherals, making them suitable for general-purpose computing.
Microcontrollers, on the other hand, integrate processing, memory, and I/O on a
single chip, making them ideal for low-power, dedicated applications like IoT and
automation.
References
1. onlineclassnotes.com
2.electronicspost.com