0% found this document useful (0 votes)
15 views10 pages

2103130 Umor Faruk Microprocessor Microcontroller Assignment.pdf

This document compares microprocessors and microcontrollers, detailing their structural and programming differences. Microprocessors are powerful CPUs requiring external components for operation, suitable for general computing, while microcontrollers integrate CPU, memory, and I/O on a single chip, optimized for specific tasks in embedded systems. The assignment includes assembly programming examples and applications for both types of devices, highlighting their advantages and use cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

2103130 Umor Faruk Microprocessor Microcontroller Assignment.pdf

This document compares microprocessors and microcontrollers, detailing their structural and programming differences. Microprocessors are powerful CPUs requiring external components for operation, suitable for general computing, while microcontrollers integrate CPU, memory, and I/O on a single chip, optimized for specific tasks in embedded systems. The assignment includes assembly programming examples and applications for both types of devices, highlighting their advantages and use cases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

H eaven’s Light is Our Guide

RAJSHAHI UNIVERSITY OF ENGINEERING & TECHNOLOGY


Department of Computer Science and Engineering

Course Name : Microprocessors, Microcontrollers and Assembly Language

Course Code : CSE 2205

Assignment Name : Compare microprocessors and microcontrollers structurally and programma

Submitted by : Submitted to:

Name: Umor Faruk Md. Sozib Hossain


Roll: 2 103130 Lecturer , Department of CSE,
Rajshahi University of Engineering and
Section : C
Technology
Session : 2021-22

Date Of Submission : 15-02-25


TOPICS:Comparison of
Microprocessor and
Microcontroller

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

• Microprocessor: A microprocessor is a central processing unit (CPU) on a single


integrated circuit that requires external peripherals (RAM, ROM, I/O devices) to
function.
• Microcontroller: A microcontroller is a compact integrated circuit that includes a
CPU, memory, and I/O peripherals on a single chip.

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]

Assembly Programming Comparison


To illustrate the programming differences, below are simple assembly code examples for
an x86 microprocessor and an AVR microcontroller.
Microprocessor (x86 Assembly)

Task: Add two numbers and store the result.

.model small

.stack 100h
.data

num1 db 05h ; First number

num2 db 03h ; Second number

result db ? ; Variable to store the sum

.code

main proc

mov ax, @data ; Load data segment

mov ds, ax

mov al, num1 ; Load first number into AL

add al, num2 ; Add second number to AL

mov result, al ; Store the result

mov ah, 4Ch ; Terminate program

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).

Microcontroller (AVR Assembly)

Task: Add two numbers and store the result in register.


; Start0000H
ORG from address 0000H
MOV A, #05H ; Load first number (5) into Accumulator A
ADD A, #03H ; Add second number (3) to Accumulator A
MOV R0, A ; Store result in register R0
END ; End of the program

Explanation:

• Loads the values into registers.


• Performs addition directly within the registers.

Key Differences in Assembly Programming

Feature Microprocessor (x86) Microcontroller (AVR)


Instruction Set Complex (CISC) Simple (RISC)
Memory Access Uses external memory Uses internal memory
Execution Time More clock cycles Fewer clock cycles

Applications and Advantages of 8086 and 8051


8086 Microprocessor

Applications:

1. Computers – Used in early personal computers (IBM PC).


2. Industrial Automation – Controls processes in factories.
3. Embedded Systems – Used in robotics and control systems.
4. Military Applications – Used in defense systems and radars.
5. Communication Systems – Applied in modems and networking equipment.

Advantages:

1. Faster Processing – 16-bit architecture enables quick calculations.


2. Supports Multiprogramming – Can handle multiple tasks simultaneously.
3. Large Memory Access – Can address up to 1 MB of memory.
4. Efficient Instruction Set – Has powerful instructions for arithmetic and logical
operations.
5. Pipelining Feature – Improves processing speed by executing multiple instructions
simultaneously.

8051 Microcontroller

Applications:

1. Home Appliances – Used in washing machines, microwave ovens, etc.


2. Automobiles – Controls engine functions and security systems.
3. Medical Devices – Used in heart rate monitors and blood pressure meters.
4. Robotics – Controls movements and sensors in robotic systems.
5. Consumer Electronics – Found in keyboards, remote controls, and toys.

Advantages:

1. Compact and Cost-Effective – Small size and affordable.


2. Low Power Consumption – Suitable for battery-operated devices.
3. Built-in Peripherals – Includes timers, serial ports, and I/O ports.
4. Easy Programming – Simple assembly language and C programming support.
5. Reliable and Durable – Can operate in harsh environments.
• 8051 Example: Used in a washing machine to control washing cycles and motor
speed.

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

You might also like