SlideShare a Scribd company logo
UNIT II
8085 MICROPROCESSOR AND
8051 MICROCONTROLLER
MICROPROCESSOR
• It is a semiconductor component that
incorporates the functions of a central
processing unit (CPU) on a single integrated
circuit (IC) . i.e., the central processing unit (CPU)
built on a single IC is called microprocessor.
MICROPROCESSOR
• It is multipurpose, programmable and clock
driven,
• Register based electronic device that reads
binary instructions from a storage device called
memory,
• Accept binary data as input, process the data
according to the instruction and provides
results as output.
Functional Block diagram of
Microprocessor
ALU Register Array
Control
Microprocessor
Functional Block diagram of
Microprocessor
• ALU (Arithmetic and Logic Unit)
– It carries out arithmetic and logic operations on 8
bit word.
– Arithmetic operation – addition, subtraction ,
multiplication , division etc.,
– Logic operation - AND,OR,EX-OR
– The content of accumulator and temporary
register are the input to the ALU.
– ALU output is stored in accumulator
• Register array
– Register is a storage unit within the
microprocessor used to store the data, address of
instruction of any program.
– Microprocessor contained 6 general purpose
register it has 8- bit memory
– Registers are B,C,D,E,H and L
– To hold 16-bit data a combination of two 8-bit
registers can be used.
– The combination of two 8-bit registers is known as
Register Pair (BC, DE and HL).
– These Registers are used to store data temporarily
during execution of the program.
• Control Unit
– The timing and control unit acts as the brain of a
computer.
– It controls all operations of the CPU.
– It controls input, output and all other devices
connected to the CPU.
Evolution of Microprocessor
• First generation Microprocessor
– 1st Microprocessor, Intel 4004, a 4 bit PMOS
Microprocessor introduced in 1971 by the Intel
corporation, USA.
– It has limited memory. It had 45 instructions and it
contained 2300 PMOS transistors.
– An enhanced version of Intel 4004 is Intel 4040.it
is also a 4bit microprocessor
– e.g., it is used simple applications such as
calculator, video games etc,..
Evolution of Microprocessor
• Second generation Microprocessor
– In 1972, Intel introduced 8- bit Microprocessor
named as Intel 8008, which also uses PMOS
technology.
– But this technology was slow and not compatible
with TTL logic
– In 1973, Intel introduced more powerful and fast
8- bit NMOS Microprocessor called Intel 8080
– Intel 8085 is the improved version of Intel 8080
• Third generation Microprocessor
– In 1978 Intel introduced a 16- bit Microprocessor
called Intel 8086.
– Other 16- bit Microprocessor are Intel 80186, Intel
80286, zilog’s z8000, Motorola’s 68000, 68010 etc.,
• Forth generation Microprocessor
– In 1985 Intel introduced a 32- bit Microprocessor
called Intel 60386
• Fifth generation Microprocessor
– Intel i860 is a 64 bit RISC microprocessor
Features of 8085
• Intel 8085 is an 8-bit general purpose
microprocessor
• NMOS microprocessor
• 40 pins
• +5 V dc supply
• 8085 has
– SID(serial input data)
– SOD (serial output data)
Architecture of 8085
• The internal logic design of the
microprocessor is called architecture.
• Three main section
– ALU
– Timing and Control unit
– Set of register
ARCHITECTURE OF 8085
• ALU
– Addition, Subtraction, Logical AND,OR…etc
• Timing and Control Unit
– Controls the entire operation of the microprocessor
• Register
Registers are used by the microprocessor for
temporary storage.
• Intel 8085 has the following registers
– 1- 8 bit register (A)
– 6-8 bit general purpose register (B,C,D,E,H & L)
– 1- 16 bit register –SP(Stack Pointer)
– 1 -16 bit –PC (Program Counter)
– Instruction register
– Temporary register
– Flag register
• Flag register
– Carry flag (CY) – it is set, If carry or borrow occurs
during the arithmetic operation.
– Parity flag (P) – it is set, if the result has even
number of it otherwise made 0.
– Auxiliary carry flag (AC) – Binary coded decimal
operations (BCD)
– Zero flag (z) – is set if the result becomes 0
– Sign flag (S) – is set if the result becomes –ve, if
+ve, it is set to 0
– 2 bit (don’t care )
Pin diagram
Signals in 8085
• 6 group of signals
• Address bus (A15-A8)-
– unidirectional
• Data bus (AD7-AD0)
– bi-directional both data and
address
• Control and Status signals
– ALE (Address Latch Enable)
– RD,WR,IO/M,S0,S1
• Power supply and Clock
frequency
– VCC +5
– VSS-Ground
– X1,X2
– CLK
• Externally initiated signals
– INTR
– INTA
– TRAP
– RST 7.5,RST6.5,RST 5.5
– READY
– HOLD
– RESET IN
– RESET OUT
– HLDA
• Serial I/O Ports
– SID
– SOD
ADRESSING MODES IN 8085
• Direct addressing
• Register addressing
• Register indirect addressing
• Immediate addressing
• Implicit addressing
• Direct addressing
– LDA 240H (Load register A with the contents of
memory location 240FH)
– STA 2400H (Store the content of the accumulator
in the memory location 2400H)
• Register addressing
– MOV B, D (move the content of register D to
register B)
– INX H (increment the content of [H-L] register pair
• Register indirect addressing
– LXI H, 2500H (Load H-L pair with 2500H)
– MOV A, B (move the content of the memory
location, whose address is in H-L pair(H-L Pair) to
accumulator)
– HLT (halt)
• Immediate addressing
– MVI A, 05 (Move 05 in register A)
– 3E, 05 (the code format of an instruction)
• Implicit addressing
– There are certain instruction which operate the
content of the accumulator.
– Such instruction do not require the address of the
operand
– CMA
– RAL
– RAR
Instruction sets 8085
• Data transfer group
• Arithmetic group
• Logical group
• Branch group
• Stack, I/O and Machine control group
Data transfer group
• MOV r1,r2
• MOV r, M (move the content of memory to
register)
• MOV M, r
• MVI r1, data
• MVI M, data
• LDA data
• STA addr (store accumulator direct)
• XCHG (exchange the content of H-L with D-E pair)
• LHLD addr (Load HL pair direct)
• SHLD addr (Store HL pair direct)
• STAX xp ( store accumulator Indirect)
Arithmetic group
• ADD r
• ADD M
• ADI data
• ADC r
• ADC M
• SUB r
• SUB M
• SUI data
• SBB r
• SBB M
• INR r
• INR M
• DCR r
• DCR M
Logical group
• ANA r(AND register with
accumulator)
• ANA M
• ANI data
• ORA r(OR register with
accumulator)
• ORA M
• ORI data
• XRA r(excusive OR register
with accumulator)
• XRA m
• XRI data
• CMA (complement acc)
• CMC(complement carry)
• CMP r (compare)
• CMP M
• CPI data
• RLC (rotate accumulater left)
• RRC(rotate accumulator right
• RAL(rotate left through carry)
• RAR(rotate right through carry)
Branch group
• Two branch instruction
–Conditional
• The conditional branch instructions
transfer the program to the specified
label when certain condition is satisfied
–Unconditional
• The conditional branch instructions
transfer the program to the specified
label when certain condition is not
satisfied
• Conditional jumb addr (label)
– If the condition is true and the program jumps to
the specified label, the execution of a conditional
jump takes 3 machine cycles and 10 states
– If the condition is not true, only two machine
cycles and 7 states are required for the execution
of the instruction.
– JZ addr (label) [jump if the result is zero]
[PC] address (label), jump if z=0
Machine cycle – 2/3
States – 7/10
Addressing mode – Immediate
Flags - None
– JNZ addr [ jump if the result is not zero]
[PC] address (label), jump if z=1
– JC addr [ jump if there is a carry ]
[PC] address (label), jump if CS = 1
– JNC addr [ jump if there is no carry ]
[PC] address (label), jump if CS = 0
– JP addr [ jump if the result is plus)
[PC] address (label), jump if S = 0
– JM addr [ jump if the result is minus)
[PC] address (label), jump if S = 1
– JPE addr [ jump if even parity)
[PC] address (label), jump if P = 0
– JPE addr [ jump if odd parity)
[PC] address (label), jump if P = 1
• CALL addr (label)
– Call the subroutine identified by the operand
– CC addr (call subroutine if carry status CS=1)
– CNC addr (call subroutine if carry status CS=0)
– CZ addr (call subroutine if result is zero)
– CNZ addr (call subroutine if result is not zero)
– CP addr (call subroutine if result is plus)
– CM addr (call subroutine if result is minus)
– CPE addr (call subroutine if even parity)
– CPOE addr (call subroutine if odd parity)
• Unconditional
– RET(Return from Subroutine)
– CALL addr
– RSTn (Restart)
Stack ,I/O and Machine control Group
• PUSH rp [push the content of register pair to stack)
• PUSH PSW [push the program status to word]
• POP rp [pop the content of register pair which
was saved from the stack]
• POP PSW
• IN PORT
• OUT PORT
• EI (enable interrupts)
• DI(disable interrupts)
• HLT (halt)
• NOP( notion oper)
• RIM(read interrupts mask)
• SIM (set interrupts mask)
SIM
RIM
Timing diagram of 8085
• Opcode fetch cycle (4T or 6T)
• Memory Read cycle (3T)
• Memory write cycle (3T)
• I/O read cycle (3T)
• I/O write cycle (3T)
• Interrupt acknowledge (6T or 12T)
• Bus idle cycle (2T or 3T)
Opcode fetch cycle
Memory Read cycle
Memory write cycle
I/O read cycle
I/O write cycle
Microcontroller
• A Microcontroller is a small computer on a
single integrated circuit containing a processor
core, memory and programmable
input/output peripherals.
• Microcontrollers are used in automatically
controlled products and devices such as
Automobile engine control systems, remote
controls, office machines, appliances, power
tools, toys and other embedded systems.
Features Microcontroller
• 8 bit CPU
• On chip oscillator
• 4Kb of ROM
• 128 bytes of RAM
• 21 special functions register
• 32 I/O lines
• 64 KB address space for external data memory
• 64 KB address space for program memory
• 2 16-bit timer/counter
Block diagram of 8051

More Related Content

What's hot

What's hot (20)

Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
8255 Programmable parallel I/O
8255 Programmable parallel I/O 8255 Programmable parallel I/O
8255 Programmable parallel I/O
 
Microprocessor Basics 8085-8255 ch-5
Microprocessor Basics 8085-8255 ch-5Microprocessor Basics 8085-8255 ch-5
Microprocessor Basics 8085-8255 ch-5
 
7 8255
7 82557 8255
7 8255
 
8155 Basic Concepts
8155 Basic Concepts8155 Basic Concepts
8155 Basic Concepts
 
1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
Lec13
Lec13Lec13
Lec13
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
 
Programmableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 pptProgrammableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 ppt
 
Class7
Class7Class7
Class7
 
1204 Ppi 8255
1204 Ppi 82551204 Ppi 8255
1204 Ppi 8255
 
8085 lab
8085 lab8085 lab
8085 lab
 
8255 class
8255 class8255 class
8255 class
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
 
8255 Introduction
8255 Introduction8255 Introduction
8255 Introduction
 
8085 ppi 8255 and 8155
8085 ppi 8255 and 81558085 ppi 8255 and 8155
8085 ppi 8255 and 8155
 
Lec12
Lec12Lec12
Lec12
 
8255 programable io
8255  programable io8255  programable io
8255 programable io
 

Similar to MICROPROCESSORS AND MICROCONTROLLERS

UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
Mohanumar S
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
gomathy S
 
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptxlec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
MadavanR1
 
itft-8085 microprocessor
itft-8085 microprocessoritft-8085 microprocessor
itft-8085 microprocessor
Shifali Sharma
 

Similar to MICROPROCESSORS AND MICROCONTROLLERS (20)

20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx20ME702– MECHATRONICS -UNIT-2.pptx
20ME702– MECHATRONICS -UNIT-2.pptx
 
8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx8085 MICROPROCESSOR.pptx
8085 MICROPROCESSOR.pptx
 
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
UNIT II –8085 MICROPROCESSOR AND 8051 MICROCONTROLLER---ME6702– MECHATRONICS
 
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptxMECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
MECHATRONICS-UNIT 2-8085 MICROPROCESSOR AND 8051 MICROCONTROLLER .pptx
 
Ree602 microprocessor unit ii
Ree602  microprocessor unit iiRee602  microprocessor unit ii
Ree602 microprocessor unit ii
 
Lec03
Lec03Lec03
Lec03
 
Discussion on 8080 Microprocessor_r1 - Everyting you need to know.pptx
Discussion on 8080 Microprocessor_r1 - Everyting you need to know.pptxDiscussion on 8080 Microprocessor_r1 - Everyting you need to know.pptx
Discussion on 8080 Microprocessor_r1 - Everyting you need to know.pptx
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085
 
Introduction to 8085svv
Introduction to 8085svvIntroduction to 8085svv
Introduction to 8085svv
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor ppt
 
PPT 8085 microprocessor
PPT 8085 microprocessor PPT 8085 microprocessor
PPT 8085 microprocessor
 
Unit 2 - Microprocessor & Microcontroller.pptx
Unit 2 -  Microprocessor & Microcontroller.pptxUnit 2 -  Microprocessor & Microcontroller.pptx
Unit 2 - Microprocessor & Microcontroller.pptx
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
 
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptxlec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
lec3-8051microcontrollerarchitecture-230130044236-5c11a082.pptx
 
Unit 2.ppt
Unit 2.pptUnit 2.ppt
Unit 2.ppt
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
itft-8085 microprocessor
itft-8085 microprocessoritft-8085 microprocessor
itft-8085 microprocessor
 
Microprocessor history1
Microprocessor history1Microprocessor history1
Microprocessor history1
 

More from selvakumar948

FRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptx
FRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptxFRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptx
FRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptx
selvakumar948
 
UNIT V clutches-TYPES OF CLUTCHES-..pptx
UNIT V clutches-TYPES OF CLUTCHES-..pptxUNIT V clutches-TYPES OF CLUTCHES-..pptx
UNIT V clutches-TYPES OF CLUTCHES-..pptx
selvakumar948
 
UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.
UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.
UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.
selvakumar948
 

More from selvakumar948 (20)

FRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptx
FRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptxFRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptx
FRICTION IN MACHINE ELEMENTS-SCREW AND NUT.pptx
 
UNIT V clutches-TYPES OF CLUTCHES-..pptx
UNIT V clutches-TYPES OF CLUTCHES-..pptxUNIT V clutches-TYPES OF CLUTCHES-..pptx
UNIT V clutches-TYPES OF CLUTCHES-..pptx
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.
UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.
UNIT-4-KOM-GEARS-TYPES AND NOMENCLATURE.
 
KINEMATICS OF CAM LINKAGES-TYPES AND CONCEPTS
KINEMATICS OF CAM LINKAGES-TYPES AND CONCEPTSKINEMATICS OF CAM LINKAGES-TYPES AND CONCEPTS
KINEMATICS OF CAM LINKAGES-TYPES AND CONCEPTS
 
KINEMATIC VELOCITY OF SIMPLE MECHANISMS-FOUR BAR & SINGLE SLIDER
KINEMATIC VELOCITY OF SIMPLE MECHANISMS-FOUR BAR & SINGLE SLIDERKINEMATIC VELOCITY OF SIMPLE MECHANISMS-FOUR BAR & SINGLE SLIDER
KINEMATIC VELOCITY OF SIMPLE MECHANISMS-FOUR BAR & SINGLE SLIDER
 
KINEMATICS OF MACHINES-UNIT-I-BASIC CONCEPTS & INTRODUCTION
KINEMATICS OF MACHINES-UNIT-I-BASIC CONCEPTS & INTRODUCTIONKINEMATICS OF MACHINES-UNIT-I-BASIC CONCEPTS & INTRODUCTION
KINEMATICS OF MACHINES-UNIT-I-BASIC CONCEPTS & INTRODUCTION
 
ETD-UNIT-I-BASIC CONCEPTS& FIRST LAW.pptx
ETD-UNIT-I-BASIC CONCEPTS& FIRST LAW.pptxETD-UNIT-I-BASIC CONCEPTS& FIRST LAW.pptx
ETD-UNIT-I-BASIC CONCEPTS& FIRST LAW.pptx
 
MECHATRONICS-Introduction
MECHATRONICS-IntroductionMECHATRONICS-Introduction
MECHATRONICS-Introduction
 
Assembly
Assembly Assembly
Assembly
 
Solid modeling
Solid modelingSolid modeling
Solid modeling
 
Solid model
Solid modelSolid model
Solid model
 
CSG
CSGCSG
CSG
 
coordinates system
coordinates systemcoordinates system
coordinates system
 
Thermodynamics kinetics
Thermodynamics kineticsThermodynamics kinetics
Thermodynamics kinetics
 
Thermodynamics-HEAT ENGINES
Thermodynamics-HEAT ENGINESThermodynamics-HEAT ENGINES
Thermodynamics-HEAT ENGINES
 
Thermodynamics
ThermodynamicsThermodynamics
Thermodynamics
 
Free convection
Free convectionFree convection
Free convection
 
LAWS OF THERMODYNAMICS
LAWS OF THERMODYNAMICSLAWS OF THERMODYNAMICS
LAWS OF THERMODYNAMICS
 
Thermodynamics AND GIBBS PARADOX
Thermodynamics AND GIBBS PARADOXThermodynamics AND GIBBS PARADOX
Thermodynamics AND GIBBS PARADOX
 

Recently uploaded

power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
Kamal Acharya
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 

Recently uploaded (20)

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Hall booking system project report .pdf
Hall booking system project report  .pdfHall booking system project report  .pdf
Hall booking system project report .pdf
 
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfDanfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltage
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docxThe Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
The Ultimate Guide to External Floating Roofs for Oil Storage Tanks.docx
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 

MICROPROCESSORS AND MICROCONTROLLERS

  • 1. UNIT II 8085 MICROPROCESSOR AND 8051 MICROCONTROLLER
  • 2. MICROPROCESSOR • It is a semiconductor component that incorporates the functions of a central processing unit (CPU) on a single integrated circuit (IC) . i.e., the central processing unit (CPU) built on a single IC is called microprocessor.
  • 3. MICROPROCESSOR • It is multipurpose, programmable and clock driven, • Register based electronic device that reads binary instructions from a storage device called memory, • Accept binary data as input, process the data according to the instruction and provides results as output.
  • 4. Functional Block diagram of Microprocessor ALU Register Array Control Microprocessor
  • 5. Functional Block diagram of Microprocessor • ALU (Arithmetic and Logic Unit) – It carries out arithmetic and logic operations on 8 bit word. – Arithmetic operation – addition, subtraction , multiplication , division etc., – Logic operation - AND,OR,EX-OR – The content of accumulator and temporary register are the input to the ALU. – ALU output is stored in accumulator
  • 6. • Register array – Register is a storage unit within the microprocessor used to store the data, address of instruction of any program. – Microprocessor contained 6 general purpose register it has 8- bit memory – Registers are B,C,D,E,H and L – To hold 16-bit data a combination of two 8-bit registers can be used. – The combination of two 8-bit registers is known as Register Pair (BC, DE and HL). – These Registers are used to store data temporarily during execution of the program.
  • 7. • Control Unit – The timing and control unit acts as the brain of a computer. – It controls all operations of the CPU. – It controls input, output and all other devices connected to the CPU.
  • 8. Evolution of Microprocessor • First generation Microprocessor – 1st Microprocessor, Intel 4004, a 4 bit PMOS Microprocessor introduced in 1971 by the Intel corporation, USA. – It has limited memory. It had 45 instructions and it contained 2300 PMOS transistors. – An enhanced version of Intel 4004 is Intel 4040.it is also a 4bit microprocessor – e.g., it is used simple applications such as calculator, video games etc,..
  • 9. Evolution of Microprocessor • Second generation Microprocessor – In 1972, Intel introduced 8- bit Microprocessor named as Intel 8008, which also uses PMOS technology. – But this technology was slow and not compatible with TTL logic – In 1973, Intel introduced more powerful and fast 8- bit NMOS Microprocessor called Intel 8080 – Intel 8085 is the improved version of Intel 8080
  • 10. • Third generation Microprocessor – In 1978 Intel introduced a 16- bit Microprocessor called Intel 8086. – Other 16- bit Microprocessor are Intel 80186, Intel 80286, zilog’s z8000, Motorola’s 68000, 68010 etc., • Forth generation Microprocessor – In 1985 Intel introduced a 32- bit Microprocessor called Intel 60386 • Fifth generation Microprocessor – Intel i860 is a 64 bit RISC microprocessor
  • 11. Features of 8085 • Intel 8085 is an 8-bit general purpose microprocessor • NMOS microprocessor • 40 pins • +5 V dc supply • 8085 has – SID(serial input data) – SOD (serial output data)
  • 12. Architecture of 8085 • The internal logic design of the microprocessor is called architecture. • Three main section – ALU – Timing and Control unit – Set of register
  • 14. • ALU – Addition, Subtraction, Logical AND,OR…etc • Timing and Control Unit – Controls the entire operation of the microprocessor • Register Registers are used by the microprocessor for temporary storage. • Intel 8085 has the following registers – 1- 8 bit register (A) – 6-8 bit general purpose register (B,C,D,E,H & L) – 1- 16 bit register –SP(Stack Pointer) – 1 -16 bit –PC (Program Counter) – Instruction register – Temporary register – Flag register
  • 15. • Flag register – Carry flag (CY) – it is set, If carry or borrow occurs during the arithmetic operation. – Parity flag (P) – it is set, if the result has even number of it otherwise made 0. – Auxiliary carry flag (AC) – Binary coded decimal operations (BCD) – Zero flag (z) – is set if the result becomes 0 – Sign flag (S) – is set if the result becomes –ve, if +ve, it is set to 0 – 2 bit (don’t care )
  • 17. Signals in 8085 • 6 group of signals • Address bus (A15-A8)- – unidirectional • Data bus (AD7-AD0) – bi-directional both data and address • Control and Status signals – ALE (Address Latch Enable) – RD,WR,IO/M,S0,S1 • Power supply and Clock frequency – VCC +5 – VSS-Ground – X1,X2 – CLK
  • 18. • Externally initiated signals – INTR – INTA – TRAP – RST 7.5,RST6.5,RST 5.5 – READY – HOLD – RESET IN – RESET OUT – HLDA • Serial I/O Ports – SID – SOD
  • 19. ADRESSING MODES IN 8085 • Direct addressing • Register addressing • Register indirect addressing • Immediate addressing • Implicit addressing
  • 20. • Direct addressing – LDA 240H (Load register A with the contents of memory location 240FH) – STA 2400H (Store the content of the accumulator in the memory location 2400H) • Register addressing – MOV B, D (move the content of register D to register B) – INX H (increment the content of [H-L] register pair
  • 21. • Register indirect addressing – LXI H, 2500H (Load H-L pair with 2500H) – MOV A, B (move the content of the memory location, whose address is in H-L pair(H-L Pair) to accumulator) – HLT (halt) • Immediate addressing – MVI A, 05 (Move 05 in register A) – 3E, 05 (the code format of an instruction)
  • 22. • Implicit addressing – There are certain instruction which operate the content of the accumulator. – Such instruction do not require the address of the operand – CMA – RAL – RAR
  • 23. Instruction sets 8085 • Data transfer group • Arithmetic group • Logical group • Branch group • Stack, I/O and Machine control group
  • 24. Data transfer group • MOV r1,r2 • MOV r, M (move the content of memory to register) • MOV M, r • MVI r1, data • MVI M, data • LDA data • STA addr (store accumulator direct) • XCHG (exchange the content of H-L with D-E pair)
  • 25. • LHLD addr (Load HL pair direct) • SHLD addr (Store HL pair direct) • STAX xp ( store accumulator Indirect)
  • 26. Arithmetic group • ADD r • ADD M • ADI data • ADC r • ADC M • SUB r • SUB M • SUI data • SBB r • SBB M • INR r • INR M • DCR r • DCR M
  • 27. Logical group • ANA r(AND register with accumulator) • ANA M • ANI data • ORA r(OR register with accumulator) • ORA M • ORI data • XRA r(excusive OR register with accumulator) • XRA m • XRI data • CMA (complement acc) • CMC(complement carry) • CMP r (compare) • CMP M • CPI data • RLC (rotate accumulater left) • RRC(rotate accumulator right • RAL(rotate left through carry) • RAR(rotate right through carry)
  • 28. Branch group • Two branch instruction –Conditional • The conditional branch instructions transfer the program to the specified label when certain condition is satisfied –Unconditional • The conditional branch instructions transfer the program to the specified label when certain condition is not satisfied
  • 29. • Conditional jumb addr (label) – If the condition is true and the program jumps to the specified label, the execution of a conditional jump takes 3 machine cycles and 10 states – If the condition is not true, only two machine cycles and 7 states are required for the execution of the instruction.
  • 30. – JZ addr (label) [jump if the result is zero] [PC] address (label), jump if z=0 Machine cycle – 2/3 States – 7/10 Addressing mode – Immediate Flags - None
  • 31. – JNZ addr [ jump if the result is not zero] [PC] address (label), jump if z=1 – JC addr [ jump if there is a carry ] [PC] address (label), jump if CS = 1 – JNC addr [ jump if there is no carry ] [PC] address (label), jump if CS = 0
  • 32. – JP addr [ jump if the result is plus) [PC] address (label), jump if S = 0 – JM addr [ jump if the result is minus) [PC] address (label), jump if S = 1 – JPE addr [ jump if even parity) [PC] address (label), jump if P = 0
  • 33. – JPE addr [ jump if odd parity) [PC] address (label), jump if P = 1 • CALL addr (label) – Call the subroutine identified by the operand – CC addr (call subroutine if carry status CS=1) – CNC addr (call subroutine if carry status CS=0) – CZ addr (call subroutine if result is zero) – CNZ addr (call subroutine if result is not zero) – CP addr (call subroutine if result is plus) – CM addr (call subroutine if result is minus) – CPE addr (call subroutine if even parity) – CPOE addr (call subroutine if odd parity)
  • 34. • Unconditional – RET(Return from Subroutine) – CALL addr – RSTn (Restart)
  • 35. Stack ,I/O and Machine control Group • PUSH rp [push the content of register pair to stack) • PUSH PSW [push the program status to word] • POP rp [pop the content of register pair which was saved from the stack] • POP PSW • IN PORT • OUT PORT • EI (enable interrupts)
  • 36. • DI(disable interrupts) • HLT (halt) • NOP( notion oper) • RIM(read interrupts mask) • SIM (set interrupts mask)
  • 37. SIM
  • 38. RIM
  • 39. Timing diagram of 8085 • Opcode fetch cycle (4T or 6T) • Memory Read cycle (3T) • Memory write cycle (3T) • I/O read cycle (3T) • I/O write cycle (3T) • Interrupt acknowledge (6T or 12T) • Bus idle cycle (2T or 3T)
  • 45. Microcontroller • A Microcontroller is a small computer on a single integrated circuit containing a processor core, memory and programmable input/output peripherals. • Microcontrollers are used in automatically controlled products and devices such as Automobile engine control systems, remote controls, office machines, appliances, power tools, toys and other embedded systems.
  • 46. Features Microcontroller • 8 bit CPU • On chip oscillator • 4Kb of ROM • 128 bytes of RAM • 21 special functions register • 32 I/O lines • 64 KB address space for external data memory • 64 KB address space for program memory • 2 16-bit timer/counter