SlideShare a Scribd company logo
Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP.
Interfacing of 8051 with 8255
Programmable Peripheral Interface
Why do we need to interface 8255 PPI with 8051?
Why do we need additional pins when we have enough on the 8051
already?
 For some applications, it is always recommended to use 8255 PPI to
avoid data loss and damage to the microcontroller.
 The 8051 has four ports: Out of four ports Port 0, Port 2, Port 3 – all
these ports also have alternate functions.
 But Port 1, this is the only port with no alternate functions. This is the
reason why we need to interface 8255 to provide an additional three
ports, namely Port A, Port B, and Port C. and the best part about the 8255
is that it is programmable.
Components Required
1. 8051 Microcontroller.
2. 8255 Programmable Peripheral Interface
3. Decoder circuit – 74LS373 (for address demultiplexing)
4. NAND gate IC – 74LS00
5. NOT gate IC – 74LS04
Chip Select Logic
For a microcontroller to interface with 8255, a LOW pulse is given to the Chip
Select pin of 8255 as it is an active low pin
Let’s allot the address to the ports of 8255 PPI
Port A: 0010 0000 (20H)
Port B: 0010 0001 (21H)
Port C: 0010 0010 (22H)
Control port: 0010 0011 (23H)
Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP.
Note that here only the last two bits – A0 and A1, are changed to select
different ports.
Hence, we can design a combinational logic circuit using a NAND gate for
which the input will be A2 – A7 address lines and CS’ as the output.
The output of the NAND gate is LOW only when ALL the inputs are HIGH.
Therefore, from the address allocations that we have done, we have:
A7 = 0, A6 = 0, A5 = 1, A4 = 0, A3 = 0, A2 = 0
Algorithm
Step 1: Construct the control word register
D7 = 1, this will make sure that all the ports of 8255 PPI are in the I/O mode.
D6 = D5 = D2 = 0: selects mode 0 for Port A, Port B, and Port C.
D4 = D1 = 1: To select Port A and Port B as input ports.
D3 = D0 = 0: To select both lower and upper Port C as output port.
Step 2: Input the data from Port A and Port B
Step 3: Add the contents of port A and port B
Step 4: Display the result in port C
Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP.
Circuit Diagram to interface 8255 PPI with 8051
Assembly Language Program to interface 8255 with 8051
PORTA EQU 0020H
PORTB EQU 0021H
PORTC EQU 0022H
CNTPORT EQU 0023H;
ORG 0000H
MOV A, #92H
MOV DPTR, #CNTPORT
MOVX @DPTR, A
Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP.
MOV DPTR, #PORTA
MOVX A, @DPTR
MOV R0, A
MOV DPTR, #PORTB
MOVX A, @DPTR
MOV R1, A
MOV A, R0
ADD A, R1;
MOV DPTR, #PORTC
MOVX @DPTR, A
END
**Note: For Referece
Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP.

More Related Content

What's hot

Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
Velalar College of Engineering and Technology
 
Serial communication in 8085
Serial communication in 8085Serial communication in 8085
Serial communication in 8085
Nitin Ahire
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
sandip das
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
Muhammed Afsal Villan
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
Pratik Gohel
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly languageMir Majid
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
Aswini Dharmaraj
 
Introduction-to-Keil.ppt
Introduction-to-Keil.pptIntroduction-to-Keil.ppt
Introduction-to-Keil.ppt
akshatsharma823122
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
Sudhanshu Janwadkar
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
Mahalakshmiv11
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
Homoud Alsohaibi
 
Interfacing of 8255 IC By Er. Swapnil Kaware.
Interfacing of 8255 IC By Er. Swapnil Kaware.Interfacing of 8255 IC By Er. Swapnil Kaware.
Interfacing of 8255 IC By Er. Swapnil Kaware.Prof. Swapnil V. Kaware
 
8255 programming
8255 programming8255 programming
8255 programming
Jeyalaksmi V Professor ECE
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
MNM Jain Engineering College
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSOR
Akhila Rahul
 
Arm 7 nxp
Arm 7 nxpArm 7 nxp
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instructionkashif Shafqat
 

What's hot (20)

Timing diagram 8085 microprocessor
Timing diagram 8085 microprocessorTiming diagram 8085 microprocessor
Timing diagram 8085 microprocessor
 
Serial communication in 8085
Serial communication in 8085Serial communication in 8085
Serial communication in 8085
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
 
AVRTIMER.pptx
AVRTIMER.pptxAVRTIMER.pptx
AVRTIMER.pptx
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
8086 assembly language
8086 assembly language8086 assembly language
8086 assembly language
 
8086 instruction set (with simulator)
8086 instruction set (with simulator)8086 instruction set (with simulator)
8086 instruction set (with simulator)
 
Introduction-to-Keil.ppt
Introduction-to-Keil.pptIntroduction-to-Keil.ppt
Introduction-to-Keil.ppt
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
Instruction sets of 8086
Instruction sets of 8086Instruction sets of 8086
Instruction sets of 8086
 
intel 8086 introduction
intel 8086 introductionintel 8086 introduction
intel 8086 introduction
 
Interfacing of 8255 IC By Er. Swapnil Kaware.
Interfacing of 8255 IC By Er. Swapnil Kaware.Interfacing of 8255 IC By Er. Swapnil Kaware.
Interfacing of 8255 IC By Er. Swapnil Kaware.
 
8255 programming
8255 programming8255 programming
8255 programming
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSOR
 
Arm 7 nxp
Arm 7 nxpArm 7 nxp
Arm 7 nxp
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
Logic, shift and rotate instruction
Logic, shift and rotate instructionLogic, shift and rotate instruction
Logic, shift and rotate instruction
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
 

Similar to Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf

1204 Ppi 8255
1204 Ppi 82551204 Ppi 8255
1204 Ppi 8255
techbed
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
ssuser47c811
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
Srikrishna Thota
 
Programmable Peripheral Devices
Programmable Peripheral Devices Programmable Peripheral Devices
Programmable Peripheral Devices
glorypriyadharshini1
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
Suraj Bora
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
MdFazleRabbi18
 
8255 Introduction
8255 Introduction8255 Introduction
8255 Introduction
SharmilaChidaravalli
 
Micro Processor And Micro Controller for engineering in Pondicherry University
Micro Processor And Micro Controller for engineering in Pondicherry UniversityMicro Processor And Micro Controller for engineering in Pondicherry University
Micro Processor And Micro Controller for engineering in Pondicherry University
ShyamShyam76
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
Ilavarasan Tamizh
 
Programmable peripheral interface 8255
Programmable peripheral interface 8255Programmable peripheral interface 8255
Programmable peripheral interface 8255
Marajulislam3
 
8255 PPI (programmable Peripheral Interface) mode 0
8255 PPI (programmable Peripheral Interface) mode 08255 PPI (programmable Peripheral Interface) mode 0
8255 PPI (programmable Peripheral Interface) mode 0
ABHIMANYUJHA8
 
Io (2)
Io (2)Io (2)
Io (2)Aisu
 
8255 ppi.pptx
8255 ppi.pptx8255 ppi.pptx
8255 ppi.pptx
zahid235639
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
deval patel
 
Unit iii microcontrollers final1
Unit iii microcontrollers final1Unit iii microcontrollers final1
Unit iii microcontrollers final1
Saritha Reddy
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
deval patel
 
Microprocessors
Microprocessors Microprocessors
Microprocessors
ganeshkumarbemech
 
1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
techbed
 

Similar to Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf (20)

1204 Ppi 8255
1204 Ppi 82551204 Ppi 8255
1204 Ppi 8255
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
 
Programmable Peripheral Devices
Programmable Peripheral Devices Programmable Peripheral Devices
Programmable Peripheral Devices
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
 
8255 Introduction
8255 Introduction8255 Introduction
8255 Introduction
 
Micro Processor And Micro Controller for engineering in Pondicherry University
Micro Processor And Micro Controller for engineering in Pondicherry UniversityMicro Processor And Micro Controller for engineering in Pondicherry University
Micro Processor And Micro Controller for engineering in Pondicherry University
 
Class7
Class7Class7
Class7
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
 
Programmable peripheral interface 8255
Programmable peripheral interface 8255Programmable peripheral interface 8255
Programmable peripheral interface 8255
 
8255 PPI (programmable Peripheral Interface) mode 0
8255 PPI (programmable Peripheral Interface) mode 08255 PPI (programmable Peripheral Interface) mode 0
8255 PPI (programmable Peripheral Interface) mode 0
 
Io (2)
Io (2)Io (2)
Io (2)
 
8255 ppi.pptx
8255 ppi.pptx8255 ppi.pptx
8255 ppi.pptx
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
Unit iii microcontrollers final1
Unit iii microcontrollers final1Unit iii microcontrollers final1
Unit iii microcontrollers final1
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
 
Microprocessors
Microprocessors Microprocessors
Microprocessors
 
8255
82558255
8255
 
1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
 

More from Srikrishna Thota

solar energy introduction.pdf
 solar energy introduction.pdf solar energy introduction.pdf
solar energy introduction.pdf
Srikrishna Thota
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
Srikrishna Thota
 
Types of Microcontrollers.pdf
Types of Microcontrollers.pdfTypes of Microcontrollers.pdf
Types of Microcontrollers.pdf
Srikrishna Thota
 
Addressing modes of 8051.pdf
Addressing modes of 8051.pdfAddressing modes of 8051.pdf
Addressing modes of 8051.pdf
Srikrishna Thota
 
interrupts of 8051.pdf
interrupts of 8051.pdfinterrupts of 8051.pdf
interrupts of 8051.pdf
Srikrishna Thota
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdf
Srikrishna Thota
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
Srikrishna Thota
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
Srikrishna Thota
 
Seven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSeven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdf
Srikrishna Thota
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdf
Srikrishna Thota
 
BInary Number Representation
 BInary Number Representation BInary Number Representation
BInary Number Representation
Srikrishna Thota
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
Srikrishna Thota
 
Operational amplifiers
Operational amplifiers Operational amplifiers
Operational amplifiers
Srikrishna Thota
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
Srikrishna Thota
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
Srikrishna Thota
 
Analog to Digital Conversion Basics
Analog to Digital Conversion BasicsAnalog to Digital Conversion Basics
Analog to Digital Conversion Basics
Srikrishna Thota
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controller
Srikrishna Thota
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
Srikrishna Thota
 

More from Srikrishna Thota (18)

solar energy introduction.pdf
 solar energy introduction.pdf solar energy introduction.pdf
solar energy introduction.pdf
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
Types of Microcontrollers.pdf
Types of Microcontrollers.pdfTypes of Microcontrollers.pdf
Types of Microcontrollers.pdf
 
Addressing modes of 8051.pdf
Addressing modes of 8051.pdfAddressing modes of 8051.pdf
Addressing modes of 8051.pdf
 
interrupts of 8051.pdf
interrupts of 8051.pdfinterrupts of 8051.pdf
interrupts of 8051.pdf
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdf
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
Seven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdfSeven segment interfacing with 8051.pdf
Seven segment interfacing with 8051.pdf
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdf
 
BInary Number Representation
 BInary Number Representation BInary Number Representation
BInary Number Representation
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
 
Operational amplifiers
Operational amplifiers Operational amplifiers
Operational amplifiers
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
Analog to Digital Conversion Basics
Analog to Digital Conversion BasicsAnalog to Digital Conversion Basics
Analog to Digital Conversion Basics
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controller
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 

Recently uploaded

The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
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
Jheel Barad
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 

Recently uploaded (20)

The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
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
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 

Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf

  • 1. Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP. Interfacing of 8051 with 8255 Programmable Peripheral Interface Why do we need to interface 8255 PPI with 8051? Why do we need additional pins when we have enough on the 8051 already?  For some applications, it is always recommended to use 8255 PPI to avoid data loss and damage to the microcontroller.  The 8051 has four ports: Out of four ports Port 0, Port 2, Port 3 – all these ports also have alternate functions.  But Port 1, this is the only port with no alternate functions. This is the reason why we need to interface 8255 to provide an additional three ports, namely Port A, Port B, and Port C. and the best part about the 8255 is that it is programmable. Components Required 1. 8051 Microcontroller. 2. 8255 Programmable Peripheral Interface 3. Decoder circuit – 74LS373 (for address demultiplexing) 4. NAND gate IC – 74LS00 5. NOT gate IC – 74LS04 Chip Select Logic For a microcontroller to interface with 8255, a LOW pulse is given to the Chip Select pin of 8255 as it is an active low pin Let’s allot the address to the ports of 8255 PPI Port A: 0010 0000 (20H) Port B: 0010 0001 (21H) Port C: 0010 0010 (22H) Control port: 0010 0011 (23H)
  • 2. Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP. Note that here only the last two bits – A0 and A1, are changed to select different ports. Hence, we can design a combinational logic circuit using a NAND gate for which the input will be A2 – A7 address lines and CS’ as the output. The output of the NAND gate is LOW only when ALL the inputs are HIGH. Therefore, from the address allocations that we have done, we have: A7 = 0, A6 = 0, A5 = 1, A4 = 0, A3 = 0, A2 = 0 Algorithm Step 1: Construct the control word register D7 = 1, this will make sure that all the ports of 8255 PPI are in the I/O mode. D6 = D5 = D2 = 0: selects mode 0 for Port A, Port B, and Port C. D4 = D1 = 1: To select Port A and Port B as input ports. D3 = D0 = 0: To select both lower and upper Port C as output port. Step 2: Input the data from Port A and Port B Step 3: Add the contents of port A and port B Step 4: Display the result in port C
  • 3. Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP. Circuit Diagram to interface 8255 PPI with 8051 Assembly Language Program to interface 8255 with 8051 PORTA EQU 0020H PORTB EQU 0021H PORTC EQU 0022H CNTPORT EQU 0023H; ORG 0000H MOV A, #92H MOV DPTR, #CNTPORT MOVX @DPTR, A
  • 4. Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP. MOV DPTR, #PORTA MOVX A, @DPTR MOV R0, A MOV DPTR, #PORTB MOVX A, @DPTR MOV R1, A MOV A, R0 ADD A, R1; MOV DPTR, #PORTC MOVX @DPTR, A END **Note: For Referece
  • 5. Interfacing of 8051 with 8255 PPI T.Srikrishna, M.Sc, M.Tech, GVP.