SlideShare a Scribd company logo
K.C.S.KASI NADAR COLLEGE OF ARTS & SCIENCE
(Belongs to S.V.H.N.A. Dharma fund)
Accredited with B++ Grade by NAAC
DEPARTMENT OF COMPUTER SCIENCE
INTRODUCTION TO MICROPROCESSOR
By
Mrs.B.RAMA PRABHA,
ASSISTANT PROFESSOR,
DEPARTMENT OF COMPUTER SCIENCE
TOPICS TO BE COVERED
 Introduction to Microprocessor
 Introduction to Microcomputer
 Assembly Language
2
Microcomputer
 A microcomputer is a small, relatively inexpensive computer with
a microprocessor as its central processing unit (CPU).
 It includes a microprocessor, memory, and input/output (I/O)
facilities.
 Microcomputers became popular in the 1970s and 80s with the
advent of increasingly powerful microprocessors. •
 Examples of Microcomputers are Intel 8051 controller-a single
board computer,
 IBM PC and Apple Macintosh computer.
3
Microcomputer
Block diagram of microcomputer
4
Block diagram of Computer
Machine Language
 To communicate with computer, instruction is given in binary
language.
 MP has 8 bit data so 2^8 = 256 combinations.
 So difficult to write programs in set of 0’s and 1’s .
for eg: 0011 1100 – is an instruction that increments the
number in accumulator by 1
1000 0000– is an instruction that add the number in register B
to the accumulator content , and keep the result in A.
 So it is very tedious and error inductive.
 For convenience, written in Hexadecimal code. For example 0011 1100
is equivalent to 3C H 5
8085 Assembly Language
 Even program is written in Hexa decimal .. It is difficult to
understand.
 Program is written in mnemonic.
For E.g.: binary code 0011 1100 (3C H in hexadecimal) is
represented by INR A
INR A –INR stands for Increment, A is accumulator this
symbol suggest the operation of incrementing the accumulator
by 1.
 So MP has 246 such bit pattern amounting to 74 different
instruction for performing various operations.
6
8085 Assembly Language
 Microprocessor cannot understand a program written I Assembly
language.
 A program known as Assembler is used to convert a Assembly
language program to machine language.
7
Assembly
language
program
Assembler
Machine
Language code
WHAT IS MICROPROCESSOR?
The word comes from the combination Micro (indicating
very small size) and Processor (process means to
manipulate e. g. certain operations on the numbers).
8
Definition of the Microprocessor
 Microprocessor is a Programmable, Clock driven, Register based, Electronic device that
reads instruction from a storage device, takes the data from input unit and process the
data according to the instructions and provides the result to the output unit.
 Programmable : Perform Different set operation on the data depending on the
sequence of instructions supplied by the programmer.
 Clock Driven : Whole task is divided into basic operations, are divided into precise
system clock periods.
 Register Based : Storage element
 Electronic Device – fabricated on a chip
9
Microprocessor based system
From the above description, we can draw the following block diagram to represent a
microprocessor-based system: Output Input Memory
10
Inside the Microprocessor
 ALU:- Arithmetic and logical operations like add, subtraction,
AND & OR.
 Register Array: - Store data during the execution of program.
 Control Unit: Provides necessary timing & control signal. It
controls the flow of data between microprocessor and
peripherals.
11
Inside the Microprocessor
 Memory: Stores information such as instructions and data in
binary format (0 and 1). Sub-system” of microprocessor-based
system. sub-system includes the registers inside the
microprocessor .
 Read Only Memory (ROM): used to store programs that do not
need alterations.
 Random Access Memory (RAM) (R/WM): used to store
programs that can read and altered like programs and data.
 Input/output: Communicates with the outside world.
 System Bus: Communication path between the microprocessor
and peripherals. group of wires to carry bits.
12
How does a Microprocessor works
 To execute a program, the microprocessor “reads” each
instruction from memory, “interprets” it, then “executes or
perform” it.
 The right name for the cycle is
 Fetch
 Decode
 Execute
 This sequence is continued until all instructions are performed.
13
Features of 8085 Microprocessor
1.It is an 8-bit microprocessor i.e. it can accept, process, or provide 8-bit data simultaneously.
2.It operates on a single +5V power supply connected at Vcc; power supply ground is connected to Vss.
3.It operates on clock cycle .
4.It has on chip clock generator.
6.It has 16 address lines, hence it can access (216) 64 Kbytes of memory.
7.It provides 8 bit I/O addresses to access (28 ) 256 I/O ports.
8.In 8085, the lower 8-bit address bus (A0 – A7) and data bus (D0 – D7) are Multiplexed to reduce
number of external pins. 14
Features of 8085 Microprocessor
It supports 74 instructions with the following addressing modes :
 Immediate
 Register
 Direct
 Indirect
 Implied
10.The Arithmetic Logic Unit (ALU) of 8085 performs Arithmatic and logical operations.
11.It has 8-bit accumulator, flag register, instruction register, six 8-bit general purpose registers
(B, C, D, E, H and L) and two 16-bit registers. (SP and PC).
12.It provides five hardware interrupts : TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.
15
8085 Architecture and
its operations
16
8085 Architecture
17
8085 Architecture
8085 architecture consists of
following blocks:
1. Register Array
2. ALU & Logical Group
3. Instruction decoder
&encoder,
4. Interrupt control Group
5. Serial I/O control Group
6. Timing and control circuitry 18
1. Register Array
 It has eight addressable 8-bit registers : A, B, C, D, E, H,
L, F, and two 16-bit registers PC and SP.
 These registers can be classified as:
General Purpose Registers
Temporary Registers :
 Temporary data register
 W and Z registers
Special Purpose Registers :
 Accumulator
 Flag registers
 Instruction register
Sixteen bit Registers :
 Program Counter (PC)
 Stack Pointer (SP)
19
1. Register Array
General purpose register
There are 6 general purpose registers in
8085 processor,
 i.e. B, C, D, E, H & L. Each register can
hold 8-bit data.
 These registers can work in pair to hold
16-bit data and their pairing combination
is like B-C, D-E & H-L.
20
1. Register Array
Temporary Register:
 It is an 8-bit register associated with the
ALU. It holds data during an
arithmetic/logical operation.
 It is used by the microprocessor.
 It is not accessible to programmer.
21
1. Register Array
Special Purpose Register:
Accumulator (A):
 The accumulator is an 8-bit register
associated with the ALU.
 The register 'A' is an accumulator in the
8085.
 It is used to hold one of the operands of
an arithmetic and logical operation.
 The final result of an arithmetic or
logical operation is also placed in the
accumulator.
22
1. Register Array
Special Purpose Register:
Instruction Register:
The instruction register holds the opcode
(operation code or instruction code) of the
instruction which is being decoded and
executed.
23
1. Register Array
Special Purpose Register:
 Flags Register:
The Intel 8085 microprocessor contains five flip-flops
to serve as a status flags. The flip-flops are reset or set
according to the conditions which arise during an
arithmetic or logical operation.
 The five status flags of Intel 8085 are:
 Carry Flag (CS)
 Parity Flag (P)
 Auxiliary Carry Flag (AC)
 Zero Flag(Z)
 Sign Flag(S)
24
1. Register Array
16 bit Register:
Program Counter (PC):
 It is a 16-bit special purpose register.
 It is used to hold the address of memory of the
next instruction to be executed.
 It keeps the track of the instruction in a program
while they are being executed.
 The microprocessor increments the content of the
next program counter during the execution of an
instruction
25
1. Register Array
16 bit Register:
Stack Pointer (SP):
 It is a 16-bit special function register used as
memory pointer.
 A stack is nothing but a portion of RAM.
 In the stack, the contents of only those registers are
saved, which are needed in the later part of the
program.
26
The Arithmetic and Logic Unit:
 ALU performs the arithmetic and logical operations.
 The result of an operation is stored in Accumalator
Instruction decoder and machine cycle encoder:
 Decodes the op-code stored in the Instruction Register (IR) and establishes the sequence of
events to follow.
 Encodes it and transfer to the timing & control unit to perform the execution of the instruction.
Timing and control circuitry
 works as the brain of the CPU
 For proper sequence and synchronization of all the operations of MP, this unit generates all the
timing and control signals necessary for communication between microprocessor and peripherals.
27
Interrupt Control group
 Interrupt:- Occurrence of an external disturbance
 After servicing the interrupt, 8085 resumes its normal working sequence
 Transfer the control to special routines
 Five interrupts: - TRAP, RST7.5, RST6.5, RST5.5, INTR
 In response to INTR, it generates INTA signal
Serial I/O control Group
 Data transfer red on D0- D7 lines is parallel data
 But under some condition it is used serial data transfer
 Serial data is entered through SID(serial input data) input (received)
 Serial data is outputted on SOD(serial output data) input (send)
28
8085 PIN DESCRIPTION
29
8085 PIN DIAGRAM
The 40 pins of the microprocessor can be
divided into six groups
1. Power supply and clock signals
2. Address bus
3. Data bus
4. Control and status signals
5. Interrupts and externally initiated
signals
6. Serial I/O ports
30
8085 PIN DIAGRAM
Power supply and Clock signals
 Vcc: + 5 volt power supply
 Vss: Ground
 X1, X2 : Crystal or R/C network or LC network
connections to set the frequency of internal
clock generator.
 CLK (output)-Clock Output is used as the
system clock for peripheral and devices
interfaced with the microprocessor.
31
8085 PIN DIAGRAM
2. Address Bus
 A8 - A15: (output; 3-state)
 It carries the most significant 8 bits of the memory address
or the 8 bits of the I/O address.
3.Data Bus:
 AD0 - AD7 (input/output; 3-state)
 These multiplexed set of lines used to carry the lower order
8 bit address as well as data bus.
 During the opcode fetch operation, in the first clock cycle,
the lines deliver the lower order address A0 - A7.
 In the subsequent IO / memory, read / write clock cycle the
lines are used as data bus.
 The CPU may read or write out data through these lines.
32
8085 PIN DIAGRAM
Control and status signals:
ALE (output) - Address Latch Enable.
 It is an output signal used to give information of AD0-AD7
contents.
 It is a positive going pulse generated when a new operation
is started by uP.
 When pulse goes high it indicates that AD0-AD7 are
address.
 When it is low it indicates that the contents are data.
RD (output 3-state, active low)
 Read memory or IO device.
 This indicates that the selected memory location or I/O
device is to be read and that the data bus is ready for
accepting data from the memory or I/O device
33
8085 PIN DIAGRAM
Control and status signals:
WR (output 3-state, active low)
 Write memory or IO device.
 This indicates that the data on the data bus is to be
written into the selected memory location or I/O
device.
IO/M (output) - Select memory or an IO device.
 This status signal indicates that the read / write
operation relates to whether the memory or I/O
device.
 It goes high to indicate an I/O operation.
 It goes low for memory operations.
34
8085 PIN DIAGRAM
Interrupts And Externally initiated operations
 They are the signals initiated by an external device to
request the microprocessor to do a particular task or
work.
 There are five hardware interrupts called,
• TRAP
• RST 7.5
• RST 6.5
• RST 5.5
• INTA
 On receipt of an interrupt, the microprocessor
acknowledges the interrupt by the active low INTA
(Interrupt Acknowledge) signal.
35
8085 PIN DIAGRAM
Interrupts And Externally initiated operations
Reset In (input, active low)
 This signal is used to reset the microprocessor.
 The program counter inside the microprocessor
is set to zero.
 The buses are tri-stated.
Reset Out (Output)
 It indicates CPU is being reset.
 Used to reset all the connected devices when the
microprocessor is reset.
36
Status Signals: S1,S2
37
IO/M S1 S0 OPERATION
0 1 1 Opcode fetch
0 1 0 Memory read
0 0 1 Memory write
1 1 0 I/O read
1 0 1 I/O write
1 1 0 Interrupt acknowledge
Z 0 1 Halt
Z x x Hold
Z x x Reset
Introduction to microprocessor

More Related Content

What's hot

8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture ppt
Parvesh Gautam
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
9840596838
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
Muthu Manickam
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
Dr.YNM
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
saleForce
 

What's hot (20)

program status word
program status wordprogram status word
program status word
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
8085 microprocessor architecture ppt
8085 microprocessor architecture ppt8085 microprocessor architecture ppt
8085 microprocessor architecture ppt
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
 
Unit 2 mpmc
Unit 2 mpmcUnit 2 mpmc
Unit 2 mpmc
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 
Addressing modes 8085
Addressing modes 8085Addressing modes 8085
Addressing modes 8085
 
Internal architecture-of-8086
Internal architecture-of-8086Internal architecture-of-8086
Internal architecture-of-8086
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
8086
80868086
8086
 
Microprocessor Fundamentals
Microprocessor FundamentalsMicroprocessor Fundamentals
Microprocessor Fundamentals
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
Pin diagram 8085
Pin diagram 8085 Pin diagram 8085
Pin diagram 8085
 
8086 pin details
8086 pin details8086 pin details
8086 pin details
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 

Similar to Introduction to microprocessor

8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
RamaPrabha24
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
Ravali Sunki
 
Download
DownloadDownload
Download
jaihooo
 
Ec 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applicationsEc 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applications
Merin Jesuraj
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMS
Sabin Gautam
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
eceprinter6
 

Similar to Introduction to microprocessor (20)

Architecture of 8085 microprocessor
Architecture of 8085 microprocessorArchitecture of 8085 microprocessor
Architecture of 8085 microprocessor
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
 
microprocessor8085 power point presentation
microprocessor8085 power point presentationmicroprocessor8085 power point presentation
microprocessor8085 power point presentation
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
 
Mpmc unit 1 notes
Mpmc unit 1 notesMpmc unit 1 notes
Mpmc unit 1 notes
 
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and MicrocontrollerMPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
MPMC UNIT-1. Microprocessor 8085 pdf Microprocessor and Microcontroller
 
EE8551 MPMC
EE8551  MPMCEE8551  MPMC
EE8551 MPMC
 
microprocessor8085pptcomplete-170518063501.pdf
microprocessor8085pptcomplete-170518063501.pdfmicroprocessor8085pptcomplete-170518063501.pdf
microprocessor8085pptcomplete-170518063501.pdf
 
20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes20838382 microprocessor-8085-notes
20838382 microprocessor-8085-notes
 
Download
DownloadDownload
Download
 
Ec 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applicationsEc 1303 microprocessor_its_applications
Ec 1303 microprocessor_its_applications
 
Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor Overview of microcontroller and microprocessor
Overview of microcontroller and microprocessor
 
Robotics & Embedded IoT System Design [Day-3]
Robotics & Embedded IoT System Design [Day-3]Robotics & Embedded IoT System Design [Day-3]
Robotics & Embedded IoT System Design [Day-3]
 
EEE226a.ppt
EEE226a.pptEEE226a.ppt
EEE226a.ppt
 
MICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMSMICROPROCESSOR 8085 WITH PROGRAMS
MICROPROCESSOR 8085 WITH PROGRAMS
 
Introduction to 8085svv
Introduction to 8085svvIntroduction to 8085svv
Introduction to 8085svv
 
architecture memory interfacing
architecture memory interfacingarchitecture memory interfacing
architecture memory interfacing
 
Introduction to 8085_by_adi_ppt
Introduction to 8085_by_adi_pptIntroduction to 8085_by_adi_ppt
Introduction to 8085_by_adi_ppt
 
Introduction to 8085 Microprocessor
Introduction to 8085 MicroprocessorIntroduction to 8085 Microprocessor
Introduction to 8085 Microprocessor
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 

More from RamaPrabha24 (11)

Dynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessorDynamic debugging in 8085 microprocessor
Dynamic debugging in 8085 microprocessor
 
programming techniques
programming techniquesprogramming techniques
programming techniques
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
instruction set and classificaion
instruction set and classificaioninstruction set and classificaion
instruction set and classificaion
 
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSORLOGICAL OPERATIONS IN 8085 MICROPROCESSOR
LOGICAL OPERATIONS IN 8085 MICROPROCESSOR
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
 
8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS8085 DATA TRANSFER INSTRUCTIONS
8085 DATA TRANSFER INSTRUCTIONS
 
PINDIAGRAM OF 8085 MICROPROCESSOR
PINDIAGRAM OF 8085 MICROPROCESSORPINDIAGRAM OF 8085 MICROPROCESSOR
PINDIAGRAM OF 8085 MICROPROCESSOR
 
memory classification
memory classificationmemory classification
memory classification
 
Basic terms used in microprocessor
Basic terms used in microprocessorBasic terms used in microprocessor
Basic terms used in microprocessor
 
Applets in Java
Applets in JavaApplets in Java
Applets in Java
 

Recently uploaded

Recently uploaded (20)

Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 

Introduction to microprocessor

  • 1. K.C.S.KASI NADAR COLLEGE OF ARTS & SCIENCE (Belongs to S.V.H.N.A. Dharma fund) Accredited with B++ Grade by NAAC DEPARTMENT OF COMPUTER SCIENCE INTRODUCTION TO MICROPROCESSOR By Mrs.B.RAMA PRABHA, ASSISTANT PROFESSOR, DEPARTMENT OF COMPUTER SCIENCE
  • 2. TOPICS TO BE COVERED  Introduction to Microprocessor  Introduction to Microcomputer  Assembly Language 2
  • 3. Microcomputer  A microcomputer is a small, relatively inexpensive computer with a microprocessor as its central processing unit (CPU).  It includes a microprocessor, memory, and input/output (I/O) facilities.  Microcomputers became popular in the 1970s and 80s with the advent of increasingly powerful microprocessors. •  Examples of Microcomputers are Intel 8051 controller-a single board computer,  IBM PC and Apple Macintosh computer. 3
  • 4. Microcomputer Block diagram of microcomputer 4 Block diagram of Computer
  • 5. Machine Language  To communicate with computer, instruction is given in binary language.  MP has 8 bit data so 2^8 = 256 combinations.  So difficult to write programs in set of 0’s and 1’s . for eg: 0011 1100 – is an instruction that increments the number in accumulator by 1 1000 0000– is an instruction that add the number in register B to the accumulator content , and keep the result in A.  So it is very tedious and error inductive.  For convenience, written in Hexadecimal code. For example 0011 1100 is equivalent to 3C H 5
  • 6. 8085 Assembly Language  Even program is written in Hexa decimal .. It is difficult to understand.  Program is written in mnemonic. For E.g.: binary code 0011 1100 (3C H in hexadecimal) is represented by INR A INR A –INR stands for Increment, A is accumulator this symbol suggest the operation of incrementing the accumulator by 1.  So MP has 246 such bit pattern amounting to 74 different instruction for performing various operations. 6
  • 7. 8085 Assembly Language  Microprocessor cannot understand a program written I Assembly language.  A program known as Assembler is used to convert a Assembly language program to machine language. 7 Assembly language program Assembler Machine Language code
  • 8. WHAT IS MICROPROCESSOR? The word comes from the combination Micro (indicating very small size) and Processor (process means to manipulate e. g. certain operations on the numbers). 8
  • 9. Definition of the Microprocessor  Microprocessor is a Programmable, Clock driven, Register based, Electronic device that reads instruction from a storage device, takes the data from input unit and process the data according to the instructions and provides the result to the output unit.  Programmable : Perform Different set operation on the data depending on the sequence of instructions supplied by the programmer.  Clock Driven : Whole task is divided into basic operations, are divided into precise system clock periods.  Register Based : Storage element  Electronic Device – fabricated on a chip 9
  • 10. Microprocessor based system From the above description, we can draw the following block diagram to represent a microprocessor-based system: Output Input Memory 10
  • 11. Inside the Microprocessor  ALU:- Arithmetic and logical operations like add, subtraction, AND & OR.  Register Array: - Store data during the execution of program.  Control Unit: Provides necessary timing & control signal. It controls the flow of data between microprocessor and peripherals. 11
  • 12. Inside the Microprocessor  Memory: Stores information such as instructions and data in binary format (0 and 1). Sub-system” of microprocessor-based system. sub-system includes the registers inside the microprocessor .  Read Only Memory (ROM): used to store programs that do not need alterations.  Random Access Memory (RAM) (R/WM): used to store programs that can read and altered like programs and data.  Input/output: Communicates with the outside world.  System Bus: Communication path between the microprocessor and peripherals. group of wires to carry bits. 12
  • 13. How does a Microprocessor works  To execute a program, the microprocessor “reads” each instruction from memory, “interprets” it, then “executes or perform” it.  The right name for the cycle is  Fetch  Decode  Execute  This sequence is continued until all instructions are performed. 13
  • 14. Features of 8085 Microprocessor 1.It is an 8-bit microprocessor i.e. it can accept, process, or provide 8-bit data simultaneously. 2.It operates on a single +5V power supply connected at Vcc; power supply ground is connected to Vss. 3.It operates on clock cycle . 4.It has on chip clock generator. 6.It has 16 address lines, hence it can access (216) 64 Kbytes of memory. 7.It provides 8 bit I/O addresses to access (28 ) 256 I/O ports. 8.In 8085, the lower 8-bit address bus (A0 – A7) and data bus (D0 – D7) are Multiplexed to reduce number of external pins. 14
  • 15. Features of 8085 Microprocessor It supports 74 instructions with the following addressing modes :  Immediate  Register  Direct  Indirect  Implied 10.The Arithmetic Logic Unit (ALU) of 8085 performs Arithmatic and logical operations. 11.It has 8-bit accumulator, flag register, instruction register, six 8-bit general purpose registers (B, C, D, E, H and L) and two 16-bit registers. (SP and PC). 12.It provides five hardware interrupts : TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. 15
  • 16. 8085 Architecture and its operations 16
  • 18. 8085 Architecture 8085 architecture consists of following blocks: 1. Register Array 2. ALU & Logical Group 3. Instruction decoder &encoder, 4. Interrupt control Group 5. Serial I/O control Group 6. Timing and control circuitry 18
  • 19. 1. Register Array  It has eight addressable 8-bit registers : A, B, C, D, E, H, L, F, and two 16-bit registers PC and SP.  These registers can be classified as: General Purpose Registers Temporary Registers :  Temporary data register  W and Z registers Special Purpose Registers :  Accumulator  Flag registers  Instruction register Sixteen bit Registers :  Program Counter (PC)  Stack Pointer (SP) 19
  • 20. 1. Register Array General purpose register There are 6 general purpose registers in 8085 processor,  i.e. B, C, D, E, H & L. Each register can hold 8-bit data.  These registers can work in pair to hold 16-bit data and their pairing combination is like B-C, D-E & H-L. 20
  • 21. 1. Register Array Temporary Register:  It is an 8-bit register associated with the ALU. It holds data during an arithmetic/logical operation.  It is used by the microprocessor.  It is not accessible to programmer. 21
  • 22. 1. Register Array Special Purpose Register: Accumulator (A):  The accumulator is an 8-bit register associated with the ALU.  The register 'A' is an accumulator in the 8085.  It is used to hold one of the operands of an arithmetic and logical operation.  The final result of an arithmetic or logical operation is also placed in the accumulator. 22
  • 23. 1. Register Array Special Purpose Register: Instruction Register: The instruction register holds the opcode (operation code or instruction code) of the instruction which is being decoded and executed. 23
  • 24. 1. Register Array Special Purpose Register:  Flags Register: The Intel 8085 microprocessor contains five flip-flops to serve as a status flags. The flip-flops are reset or set according to the conditions which arise during an arithmetic or logical operation.  The five status flags of Intel 8085 are:  Carry Flag (CS)  Parity Flag (P)  Auxiliary Carry Flag (AC)  Zero Flag(Z)  Sign Flag(S) 24
  • 25. 1. Register Array 16 bit Register: Program Counter (PC):  It is a 16-bit special purpose register.  It is used to hold the address of memory of the next instruction to be executed.  It keeps the track of the instruction in a program while they are being executed.  The microprocessor increments the content of the next program counter during the execution of an instruction 25
  • 26. 1. Register Array 16 bit Register: Stack Pointer (SP):  It is a 16-bit special function register used as memory pointer.  A stack is nothing but a portion of RAM.  In the stack, the contents of only those registers are saved, which are needed in the later part of the program. 26
  • 27. The Arithmetic and Logic Unit:  ALU performs the arithmetic and logical operations.  The result of an operation is stored in Accumalator Instruction decoder and machine cycle encoder:  Decodes the op-code stored in the Instruction Register (IR) and establishes the sequence of events to follow.  Encodes it and transfer to the timing & control unit to perform the execution of the instruction. Timing and control circuitry  works as the brain of the CPU  For proper sequence and synchronization of all the operations of MP, this unit generates all the timing and control signals necessary for communication between microprocessor and peripherals. 27
  • 28. Interrupt Control group  Interrupt:- Occurrence of an external disturbance  After servicing the interrupt, 8085 resumes its normal working sequence  Transfer the control to special routines  Five interrupts: - TRAP, RST7.5, RST6.5, RST5.5, INTR  In response to INTR, it generates INTA signal Serial I/O control Group  Data transfer red on D0- D7 lines is parallel data  But under some condition it is used serial data transfer  Serial data is entered through SID(serial input data) input (received)  Serial data is outputted on SOD(serial output data) input (send) 28
  • 30. 8085 PIN DIAGRAM The 40 pins of the microprocessor can be divided into six groups 1. Power supply and clock signals 2. Address bus 3. Data bus 4. Control and status signals 5. Interrupts and externally initiated signals 6. Serial I/O ports 30
  • 31. 8085 PIN DIAGRAM Power supply and Clock signals  Vcc: + 5 volt power supply  Vss: Ground  X1, X2 : Crystal or R/C network or LC network connections to set the frequency of internal clock generator.  CLK (output)-Clock Output is used as the system clock for peripheral and devices interfaced with the microprocessor. 31
  • 32. 8085 PIN DIAGRAM 2. Address Bus  A8 - A15: (output; 3-state)  It carries the most significant 8 bits of the memory address or the 8 bits of the I/O address. 3.Data Bus:  AD0 - AD7 (input/output; 3-state)  These multiplexed set of lines used to carry the lower order 8 bit address as well as data bus.  During the opcode fetch operation, in the first clock cycle, the lines deliver the lower order address A0 - A7.  In the subsequent IO / memory, read / write clock cycle the lines are used as data bus.  The CPU may read or write out data through these lines. 32
  • 33. 8085 PIN DIAGRAM Control and status signals: ALE (output) - Address Latch Enable.  It is an output signal used to give information of AD0-AD7 contents.  It is a positive going pulse generated when a new operation is started by uP.  When pulse goes high it indicates that AD0-AD7 are address.  When it is low it indicates that the contents are data. RD (output 3-state, active low)  Read memory or IO device.  This indicates that the selected memory location or I/O device is to be read and that the data bus is ready for accepting data from the memory or I/O device 33
  • 34. 8085 PIN DIAGRAM Control and status signals: WR (output 3-state, active low)  Write memory or IO device.  This indicates that the data on the data bus is to be written into the selected memory location or I/O device. IO/M (output) - Select memory or an IO device.  This status signal indicates that the read / write operation relates to whether the memory or I/O device.  It goes high to indicate an I/O operation.  It goes low for memory operations. 34
  • 35. 8085 PIN DIAGRAM Interrupts And Externally initiated operations  They are the signals initiated by an external device to request the microprocessor to do a particular task or work.  There are five hardware interrupts called, • TRAP • RST 7.5 • RST 6.5 • RST 5.5 • INTA  On receipt of an interrupt, the microprocessor acknowledges the interrupt by the active low INTA (Interrupt Acknowledge) signal. 35
  • 36. 8085 PIN DIAGRAM Interrupts And Externally initiated operations Reset In (input, active low)  This signal is used to reset the microprocessor.  The program counter inside the microprocessor is set to zero.  The buses are tri-stated. Reset Out (Output)  It indicates CPU is being reset.  Used to reset all the connected devices when the microprocessor is reset. 36
  • 37. Status Signals: S1,S2 37 IO/M S1 S0 OPERATION 0 1 1 Opcode fetch 0 1 0 Memory read 0 0 1 Memory write 1 1 0 I/O read 1 0 1 I/O write 1 1 0 Interrupt acknowledge Z 0 1 Halt Z x x Hold Z x x Reset