SlideShare a Scribd company logo
1 of 143
Microprocessor and
Microcontroller
Prof. P. V. Gaikwad
Lecture 1: 03/08/2023
Introduction
Basic Concepts of Microprocessor
Definition of the Microprocessor
Microprocessor Based System with Bus
Architecture
Arithmetic and Logic Unit (ALU):
ALU performs arithmetic and logical operations such as addition, subtraction, AND, OR etc and
results are stored in the register or in the memory unit or send to output unit.
Register Unit
Microprocessor consists of various registers. The registers are used for temporary storage of data
during execution of program. Some of the registers accessible to user through various instruction.
Control Unit
The control unit provides necessary timing and control signals to all the operations in the
microprocessor and peripherals including memory.
Memory
It stores binary information such as instructions and data and provide that information to
microprocessor when required
System Bus
The system bus is a communication path between the microprocessor and the peripherals. It is
nothing but a group of wires that carries data in the form of bits.
How does a microprocessor works?
Machine Language
8085 Assembly Language
Lecture 2 : 04/08/2023
Features of microprocessor 8085
Internal Architecture of 8085
Week 2
Lecture 3: 08/08/2023
Special Purpose Registers
Animation
Week 2
Lecture 4: 10/08/2023
Pin Configuration of 8085
8-bit general purpose μp
Capable of addressing 64 k of memory
Has 40 pins
Requires +5 v power supply
Can operate with 3 MHz clock
Pin configuration of 8085
All the signals can be classified into
Six groups –
1. Address Bus
2. Data Bus
3. Control & Status signals
4. Power signal & frequency
signals
5. Externally initiated signals
6. Serial I/O ports
Address & data bus
• 8085 μp consists of 16 signal pins use as address bus.
• Divide into 2 part: A15 – A8 (upper)
AD7 – AD0 (lower).
• A15 – A8 : Unidirectional, known as ‘high order address’.
• AD7 – AD0 : bidirectional and dual purpose (address and data placed
once at a time).
• AD7 – AD0 also known as ‘low order address’.
• To execute an instruction, at early stage AD7 – AD0 uses as address
bus and alternately as data bus for the next cycle.
• The method to change from address bus to data bus known as ‘bus
multiplexing’.
Control & Status signals
This group of signal includes-
 Two control signals (RD’ & WR’)
 Three status signals (IO/M’ , S1 & S0)
 One special signal (ALE)
• RD’ – Read (active low). To indicate that the I/O or memory
selected is to be read and data are available on the bus.
• WR’ – Write (Active low). This is to indicate that the data available
on the bus are to be written to memory or I/O ports.
• IO/M’ – To differentiate I/O operation or memory operations.
• ‘0’ - indicates a memory operation.
• ‘1’-indicates an I/O operation.
• IO/M’ combined with RD and WR to generate I/O and memory control
signals.
Control and Status Signals.
•S1 and S0: Status signals, similar to IO/M, can identify various
operations as shown on the following table :
Control & Status signals
•ALE (Address Latch Enable) signal :
ALE used to de-multiplex address/data bus
Active high signal - generated to show the start of 8085 operation.
ALE = 1 when AD0 –AD7 lines have an address.
ALE = 0 when AD0 – AD7 lines have a data.
Power signal & frequency signals
 Vcc : +5 V power supply
 Vss : Ground reference
 X1 & X2 : A crystal is connected at
these two pins. The frequency is
divided by two.
Therefore, to operate a system at 3
MHz, the crystal should have a
frequency of 6 MHz.
 CLK OUT : This signal is used as the
system clock for other devices.
Externally initiated Signals including Interrupt
Externally initiated Signals including Interrupt
• An interrupt is a hardware-initiated subroutine CALL.
• When interrupt pin is activated, an ISR will be called,
interrupting the program that is currently executing.
Pin Subroutine Location
TRAP 0024
RST 5.5 002C
RST 6.5 0034
RST 7.5 003C
INTR *
Note: * the address of the ISR is determined by the external hardware.
Externally initiated Signals including Interrupt
• INTR input is enabled when EI instruction is executed.
• The status of the RST 7.5, RST 6.5 and RST 5.5 pins are
determined by both EI instruction and the condition
of the mask bits in the interrupt mask register.
Externally initiated Signals including Interrupt
RESET IN’ : When the signal on this pin goes low,
the program counter is set to zero.
the buses are tri-sated.
MPU is reset.
RESET OUT : This signal is used to reset other
devices.
Serial I/O ports
The 8085 has two signals to implement the
serial transmission:
 SID: Serial Input Data
 SOD: Serial Output Data
Week 3
Lecture: 17/08/2023
Limitations of 8085
• The low order address bus is multiplexed with the data
bus. The buses need to be de-multiplexed.
• Appropriate control signals need to be generated to
interface memory and I/O with the 8085.
Generating Control Signals
De-multiplexing Address/Data Lines
De-multiplexed Address & Data bus with Control Signals
MPU Communication
Figure : Moving data form memory to MPU using instruction MOV C, A
(code machine 4FH = 0100 1111)
Instruction and data formats:
• The format of a typical instruction is composed of two parts: an
operation code or op-code and an operand.
• Every instruction needs an op-code to specify what the
operation of the instruction is and then an operand that gives
the appropriate data needed for that particular operation code.
• According to the word or byte size the 8085 instructions are
classified into three types. They are
a) One byte (single) instructions.
b) Two byte instructions.
c) Three byte instructions.
One–byte instructions: An instruction with only opcode and do not require
any data or address is called a one byte instruction.
Ex: 1. MOV C, A Hex code = 4FH (one byte)
2. ADD B Hex code = 80H (one byte)
3. CMA Hex code = 2FH (one byte)
Two–byte instructions: A two byte instruction is one which contains an 8-bit
op-code and 8-bit operand (Data).
Ex: 1. MVI A, 09 Hex code = 3E, 09 (two bytes)
2. ADD B, 07 Hex code = 80, 07 (two bytes)
3. SUB A, 05 Hex code = 97, 05 (two bytes)
Three–byte instructions: A three byte instruction contains an opcode plus a
16 – bit address.
Ex: 1.LXI H, 8509 Hex code = 21, 09, 85 (Three bytes)
2.LDA 8509 Hex code = 3A, 09, 85 (Three bytes)
3. JMP 9567 Hex code = C3, 67, 95 (Three bytes)
4. STA 3525 Hex code = 32, 35, 25 (Three bytes)
Instruction Set of 8085
An instruction is a binary pattern designed inside a microprocessor to
perform a specific function.
The entire group of instructions that a microprocessor supports is
called Instruction Set.
8085 has 246 instructions.
Each instruction is represented by an 8-bit binary value
These 8-bits of binary value is called Op-Code or Instruction Byte.
Week 3
Lecture: 18/08/2023
Addressing Modes of 8085
The various ways of specifying data are called addressing modes.
The various addressing modes of 8085 are as below:
1. Immediate addressing mode
2. Direct addressing mode
3. Register addressing mode
4. Register indirect addressing mode
5. Inherent addressing mode
Immediate addressing mode
• In immediate addressing mode the source operand is always
data.
• If the data is 8-bit, then the instruction will be of 2 bytes, if the
data is of 16-bit then the instruction will be of 3 bytes.
• MVI is the operation.
• 05 H is the immediate data (source).
• A is the destination.
Direct addressing mode
• In direct addressing mode, the data to be operated is available
inside a memory location and that memory location is directly
specified as an operand.
• The operand is directly available in the instruction itself.
• LDA is the operation.
• 2500 H is the address of source.
• Accumulator is the destination.
Register addressing mode
• In register addressing mode, the data to be operated is available
inside the register(s) and register(s) is(are) operands.
• Therefore the operation is performed within various registers of
the microprocessor.
• MOV is the operation.
• B is the source of data.
• A is the destination.
Register indirect addressing mode
• In register indirect addressing mode, the data to be operated is
available inside a memory location and that memory location is
indirectly specified by a register pair.
• MOV is the operation.
• M is the memory location specified by H-L register pair.
• A is the destination.
Inherent addressing mode
• In implied/implicit addressing mode the operand is hidden and
the data to be operated is available in the instruction itself.
• CMA is the operation.
• A is the source.
• A is the destination.
Week 4
Lecture: 22/08/2023
Classification of Instruction Set
Data Transfer Instruction
Arithmetic Instructions
Logical Instructions
Branching Instructions
Control Instructions
Data Transfer Instructions
• These instructions move data between registers, or between memory
and registers.
• These instructions copy data from source to destination.
• While copying, the contents of source are not modified.
Week 4
Lecture: 24/08/2023
Data Transfer Instruction
Opcode Operand Discription
SPHL None Copy H and L registers to stack pointer
Opcode Operand Discription
PCHL None Copy H and L registers to program counter
Arithmetic Instructions
These instructions perform the operations like:
Addition
Subtract
Increment
Decrement
Week 4
Lecture: 25/08/2023
Week 5
Lecture: 29/08/2023
Week 5
Lecture: 31/08/2023
Week 5
Lecture: 01/09/2023
Week 6
Lecture: 05/09/2023
Stack in 8085 Microprocessor
• The stack is a special area in memory used by the CPU to store register
information or general data information during program execution. The stack has
a top and a bottom.
• A stack is a region of memory that is used to store data temporarily. In the 8085
microprocessor, the stack is implemented using a dedicated block of memory
known as the stack pointer (SP).
• The memory location where a word was most recently stored is called the top of
stack.
• The stack pointer points to the current top of the stack, which is the location
where the next item will be stored.
• The stack used is a Last in first out (LIFO) structure that uses push and pull (pop)
operations.
• When data is pushed onto the stack, the stack pointer is decremented by one to
point to the next available memory location. When data is popped from the
stack, the stack pointer is incremented by one to point to the next item on the
stack.
Stack in 8085 Microprocessor
Stack Pointer Instructions
The 8085 microprocessor provides a set of instructions that can be used to
manipulate the stack. These instructions include:
1. PUSH: This instruction is used to push a register or memory location onto the stack. The contents
of the register or memory location are first copied to the memory location pointed to by the
stack pointer, and then the stack pointer is decremented.
2. POP: This instruction is used to pop the topmost item from the stack. The contents of the
memory location pointed to by the stack pointer are first copied to the register or memory
location specified in the instruction, and then the stack pointer is incremented.
PUSH rp/PSW
• This instruction is used to push a register or memory location onto the stack.
• The contents of the register or memory location are first copied to the memory
location pointed to by the stack pointer, and then the stack pointer is
decremented.
Example: PUSH B Assumes that the SP register contains 2099H, B = 32H and C =
57H
POP rp/PSW
• This instruction is used to pop the topmost item from the stack.
• The contents of the memory location pointed to by the stack pointer
are first copied to the register or memory location specified in the
instruction, and then the stack pointer is incremented.
• Example POP H
Week 6
Lecture: 08/09/2023
Timing Diagram
• Timing Diagram is a graphical representation. It represents the
execution time taken by each instruction in a graphical format. The
execution time is represented in T-states.
• Instruction Cycle: The time required to execute an instruction is
called instruction cycle.
• Machine Cycle: The time required to access the memory or
input/output devices is called machine cycle.
• T-State:
The machine cycle and instruction cycle takes multiple clock periods.
A portion of an operation carried out in one system clock period is
called as T-state.
Machine cycles of 8085
The 8085 microprocessor has 5 (seven) basic machine cycles. They are
Opcode fetch cycle (4T)
Memory read cycle (3 T)
Memory write cycle (3 T)
I/O read cycle (3 T)
I/O write cycle (3 T)
Opcode fetch machine cycle of 8085 :
• Each instruction of the processor has one byte
opcode.
• The opcodes are stored in memory. So, the
processor executes the opcode fetch machine
cycle to fetch the opcode from memory.
• Hence, every instruction starts with opcode fetch
machine cycle.
• The time taken by the processor to execute the
opcode fetch cycle is 4T.
• In this time, the first, 3 T-states are used for
fetching the opcode from memory and the
remaining T-states are used for internal
operations by the processor.

More Related Content

Similar to Microprocessor and Microcontroller.pptx

Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationAmrutaMehata
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecturedeval patel
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions convertedArghodeepPaul
 
Microprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answersMicroprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answersMathankumar S
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessorAnuja Gunale
 
An introduction to microprocessor architecture using INTEL 8085 as a classic...
An introduction to microprocessor  architecture using INTEL 8085 as a classic...An introduction to microprocessor  architecture using INTEL 8085 as a classic...
An introduction to microprocessor architecture using INTEL 8085 as a classic...Prasad Deshpande
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor pptRJ Aniket
 

Similar to Microprocessor and Microcontroller.pptx (20)

Mp 8085
Mp 8085Mp 8085
Mp 8085
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
Unit 2.ppt
Unit 2.pptUnit 2.ppt
Unit 2.ppt
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
viva q&a for mp lab
viva q&a for mp labviva q&a for mp lab
viva q&a for mp lab
 
microprocessor
 microprocessor microprocessor
microprocessor
 
Bt0068
Bt0068Bt0068
Bt0068
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions converted
 
12 mt06ped001
12 mt06ped001 12 mt06ped001
12 mt06ped001
 
Microprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answersMicroprocessor & Microcontoller short questions with answers
Microprocessor & Microcontoller short questions with answers
 
Introduction to 80386
Introduction to 80386Introduction to 80386
Introduction to 80386
 
MP_MC.pdf
MP_MC.pdfMP_MC.pdf
MP_MC.pdf
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
Qb microprocessors
Qb microprocessorsQb microprocessors
Qb microprocessors
 
8085 intro
8085 intro8085 intro
8085 intro
 
8085 microprocessor
8085 microprocessor8085 microprocessor
8085 microprocessor
 
An introduction to microprocessor architecture using INTEL 8085 as a classic...
An introduction to microprocessor  architecture using INTEL 8085 as a classic...An introduction to microprocessor  architecture using INTEL 8085 as a classic...
An introduction to microprocessor architecture using INTEL 8085 as a classic...
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor ppt
 

Recently uploaded

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 

Recently uploaded (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 

Microprocessor and Microcontroller.pptx

  • 4. Basic Concepts of Microprocessor
  • 5. Definition of the Microprocessor
  • 6. Microprocessor Based System with Bus Architecture
  • 7. Arithmetic and Logic Unit (ALU): ALU performs arithmetic and logical operations such as addition, subtraction, AND, OR etc and results are stored in the register or in the memory unit or send to output unit. Register Unit Microprocessor consists of various registers. The registers are used for temporary storage of data during execution of program. Some of the registers accessible to user through various instruction. Control Unit The control unit provides necessary timing and control signals to all the operations in the microprocessor and peripherals including memory. Memory It stores binary information such as instructions and data and provide that information to microprocessor when required System Bus The system bus is a communication path between the microprocessor and the peripherals. It is nothing but a group of wires that carries data in the form of bits.
  • 8. How does a microprocessor works?
  • 11. Lecture 2 : 04/08/2023
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Week 2 Lecture 3: 08/08/2023
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 27. Week 2 Lecture 4: 10/08/2023
  • 28. Pin Configuration of 8085 8-bit general purpose μp Capable of addressing 64 k of memory Has 40 pins Requires +5 v power supply Can operate with 3 MHz clock
  • 29. Pin configuration of 8085 All the signals can be classified into Six groups – 1. Address Bus 2. Data Bus 3. Control & Status signals 4. Power signal & frequency signals 5. Externally initiated signals 6. Serial I/O ports
  • 30. Address & data bus • 8085 μp consists of 16 signal pins use as address bus. • Divide into 2 part: A15 – A8 (upper) AD7 – AD0 (lower). • A15 – A8 : Unidirectional, known as ‘high order address’. • AD7 – AD0 : bidirectional and dual purpose (address and data placed once at a time). • AD7 – AD0 also known as ‘low order address’. • To execute an instruction, at early stage AD7 – AD0 uses as address bus and alternately as data bus for the next cycle. • The method to change from address bus to data bus known as ‘bus multiplexing’.
  • 31. Control & Status signals This group of signal includes-  Two control signals (RD’ & WR’)  Three status signals (IO/M’ , S1 & S0)  One special signal (ALE) • RD’ – Read (active low). To indicate that the I/O or memory selected is to be read and data are available on the bus. • WR’ – Write (Active low). This is to indicate that the data available on the bus are to be written to memory or I/O ports. • IO/M’ – To differentiate I/O operation or memory operations. • ‘0’ - indicates a memory operation. • ‘1’-indicates an I/O operation. • IO/M’ combined with RD and WR to generate I/O and memory control signals.
  • 32. Control and Status Signals. •S1 and S0: Status signals, similar to IO/M, can identify various operations as shown on the following table :
  • 33. Control & Status signals •ALE (Address Latch Enable) signal : ALE used to de-multiplex address/data bus Active high signal - generated to show the start of 8085 operation. ALE = 1 when AD0 –AD7 lines have an address. ALE = 0 when AD0 – AD7 lines have a data.
  • 34. Power signal & frequency signals  Vcc : +5 V power supply  Vss : Ground reference  X1 & X2 : A crystal is connected at these two pins. The frequency is divided by two. Therefore, to operate a system at 3 MHz, the crystal should have a frequency of 6 MHz.  CLK OUT : This signal is used as the system clock for other devices.
  • 35. Externally initiated Signals including Interrupt
  • 36. Externally initiated Signals including Interrupt • An interrupt is a hardware-initiated subroutine CALL. • When interrupt pin is activated, an ISR will be called, interrupting the program that is currently executing. Pin Subroutine Location TRAP 0024 RST 5.5 002C RST 6.5 0034 RST 7.5 003C INTR * Note: * the address of the ISR is determined by the external hardware.
  • 37. Externally initiated Signals including Interrupt • INTR input is enabled when EI instruction is executed. • The status of the RST 7.5, RST 6.5 and RST 5.5 pins are determined by both EI instruction and the condition of the mask bits in the interrupt mask register.
  • 38. Externally initiated Signals including Interrupt RESET IN’ : When the signal on this pin goes low, the program counter is set to zero. the buses are tri-sated. MPU is reset. RESET OUT : This signal is used to reset other devices.
  • 39. Serial I/O ports The 8085 has two signals to implement the serial transmission:  SID: Serial Input Data  SOD: Serial Output Data
  • 41. Limitations of 8085 • The low order address bus is multiplexed with the data bus. The buses need to be de-multiplexed. • Appropriate control signals need to be generated to interface memory and I/O with the 8085.
  • 44. De-multiplexed Address & Data bus with Control Signals
  • 45. MPU Communication Figure : Moving data form memory to MPU using instruction MOV C, A (code machine 4FH = 0100 1111)
  • 46. Instruction and data formats: • The format of a typical instruction is composed of two parts: an operation code or op-code and an operand. • Every instruction needs an op-code to specify what the operation of the instruction is and then an operand that gives the appropriate data needed for that particular operation code. • According to the word or byte size the 8085 instructions are classified into three types. They are a) One byte (single) instructions. b) Two byte instructions. c) Three byte instructions.
  • 47. One–byte instructions: An instruction with only opcode and do not require any data or address is called a one byte instruction. Ex: 1. MOV C, A Hex code = 4FH (one byte) 2. ADD B Hex code = 80H (one byte) 3. CMA Hex code = 2FH (one byte) Two–byte instructions: A two byte instruction is one which contains an 8-bit op-code and 8-bit operand (Data). Ex: 1. MVI A, 09 Hex code = 3E, 09 (two bytes) 2. ADD B, 07 Hex code = 80, 07 (two bytes) 3. SUB A, 05 Hex code = 97, 05 (two bytes) Three–byte instructions: A three byte instruction contains an opcode plus a 16 – bit address. Ex: 1.LXI H, 8509 Hex code = 21, 09, 85 (Three bytes) 2.LDA 8509 Hex code = 3A, 09, 85 (Three bytes) 3. JMP 9567 Hex code = C3, 67, 95 (Three bytes) 4. STA 3525 Hex code = 32, 35, 25 (Three bytes)
  • 48. Instruction Set of 8085 An instruction is a binary pattern designed inside a microprocessor to perform a specific function. The entire group of instructions that a microprocessor supports is called Instruction Set. 8085 has 246 instructions. Each instruction is represented by an 8-bit binary value These 8-bits of binary value is called Op-Code or Instruction Byte.
  • 50. Addressing Modes of 8085 The various ways of specifying data are called addressing modes. The various addressing modes of 8085 are as below: 1. Immediate addressing mode 2. Direct addressing mode 3. Register addressing mode 4. Register indirect addressing mode 5. Inherent addressing mode
  • 51. Immediate addressing mode • In immediate addressing mode the source operand is always data. • If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then the instruction will be of 3 bytes. • MVI is the operation. • 05 H is the immediate data (source). • A is the destination.
  • 52. Direct addressing mode • In direct addressing mode, the data to be operated is available inside a memory location and that memory location is directly specified as an operand. • The operand is directly available in the instruction itself. • LDA is the operation. • 2500 H is the address of source. • Accumulator is the destination.
  • 53. Register addressing mode • In register addressing mode, the data to be operated is available inside the register(s) and register(s) is(are) operands. • Therefore the operation is performed within various registers of the microprocessor. • MOV is the operation. • B is the source of data. • A is the destination.
  • 54. Register indirect addressing mode • In register indirect addressing mode, the data to be operated is available inside a memory location and that memory location is indirectly specified by a register pair. • MOV is the operation. • M is the memory location specified by H-L register pair. • A is the destination.
  • 55. Inherent addressing mode • In implied/implicit addressing mode the operand is hidden and the data to be operated is available in the instruction itself. • CMA is the operation. • A is the source. • A is the destination.
  • 57. Classification of Instruction Set Data Transfer Instruction Arithmetic Instructions Logical Instructions Branching Instructions Control Instructions
  • 58. Data Transfer Instructions • These instructions move data between registers, or between memory and registers. • These instructions copy data from source to destination. • While copying, the contents of source are not modified.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. Data Transfer Instruction Opcode Operand Discription SPHL None Copy H and L registers to stack pointer Opcode Operand Discription PCHL None Copy H and L registers to program counter
  • 71. Arithmetic Instructions These instructions perform the operations like: Addition Subtract Increment Decrement
  • 72.
  • 73.
  • 74.
  • 75.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122.
  • 124.
  • 125.
  • 126.
  • 127.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132.
  • 133.
  • 134.
  • 135. Stack in 8085 Microprocessor • The stack is a special area in memory used by the CPU to store register information or general data information during program execution. The stack has a top and a bottom. • A stack is a region of memory that is used to store data temporarily. In the 8085 microprocessor, the stack is implemented using a dedicated block of memory known as the stack pointer (SP). • The memory location where a word was most recently stored is called the top of stack. • The stack pointer points to the current top of the stack, which is the location where the next item will be stored. • The stack used is a Last in first out (LIFO) structure that uses push and pull (pop) operations. • When data is pushed onto the stack, the stack pointer is decremented by one to point to the next available memory location. When data is popped from the stack, the stack pointer is incremented by one to point to the next item on the stack.
  • 136. Stack in 8085 Microprocessor
  • 137. Stack Pointer Instructions The 8085 microprocessor provides a set of instructions that can be used to manipulate the stack. These instructions include: 1. PUSH: This instruction is used to push a register or memory location onto the stack. The contents of the register or memory location are first copied to the memory location pointed to by the stack pointer, and then the stack pointer is decremented. 2. POP: This instruction is used to pop the topmost item from the stack. The contents of the memory location pointed to by the stack pointer are first copied to the register or memory location specified in the instruction, and then the stack pointer is incremented.
  • 138. PUSH rp/PSW • This instruction is used to push a register or memory location onto the stack. • The contents of the register or memory location are first copied to the memory location pointed to by the stack pointer, and then the stack pointer is decremented. Example: PUSH B Assumes that the SP register contains 2099H, B = 32H and C = 57H
  • 139. POP rp/PSW • This instruction is used to pop the topmost item from the stack. • The contents of the memory location pointed to by the stack pointer are first copied to the register or memory location specified in the instruction, and then the stack pointer is incremented. • Example POP H
  • 141. Timing Diagram • Timing Diagram is a graphical representation. It represents the execution time taken by each instruction in a graphical format. The execution time is represented in T-states. • Instruction Cycle: The time required to execute an instruction is called instruction cycle. • Machine Cycle: The time required to access the memory or input/output devices is called machine cycle. • T-State: The machine cycle and instruction cycle takes multiple clock periods. A portion of an operation carried out in one system clock period is called as T-state.
  • 142. Machine cycles of 8085 The 8085 microprocessor has 5 (seven) basic machine cycles. They are Opcode fetch cycle (4T) Memory read cycle (3 T) Memory write cycle (3 T) I/O read cycle (3 T) I/O write cycle (3 T)
  • 143. Opcode fetch machine cycle of 8085 : • Each instruction of the processor has one byte opcode. • The opcodes are stored in memory. So, the processor executes the opcode fetch machine cycle to fetch the opcode from memory. • Hence, every instruction starts with opcode fetch machine cycle. • The time taken by the processor to execute the opcode fetch cycle is 4T. • In this time, the first, 3 T-states are used for fetching the opcode from memory and the remaining T-states are used for internal operations by the processor.