SlideShare a Scribd company logo
7
Most read
20
Most read
24
Most read
PPI : 82C55
   The 82C55 is a popular interfacing component,
    that can interface any TTL-compatible I/O device
    to the microprocessor.
   It is used to interface to the keyboard and a
    parallel printer port in PCs (usually as part of an
    integrated chipset).
   Requires insertion of wait states if used with a
    microprocessor using higher that an 8 MHz clock.
   PPI has 24 pins for I/O that are programmable in
    groups of 12 pins and has three distinct modes of
    operation.
   In the PC, an 82C55 or its equivalent is decoded
    at I/O ports 60H-63H.
8255 Block Diagram
Pin layout of 8255
Interfacing 8255 PPI
8255 Programmable Peripheral Interface
               Data bus
                           D[7:0]
                                                            PA[7:0]
                      A0
 8086                 A1                                    PB[7:0]
                     RD         Control port
                     WR                                     PC[7:0]
                   RESET
          A7                                 CS
          A6
          A5
          A4
          A3
          A2                     A1     A0        Port
        IO/M
                            0       0             PA
                            0       1             PB
                            1       0             PC
                            1       1             Control
8255 Programmable Peripheral
          Interface
Programming 8255
 8255 has three operation modes: mode 0, mode 1, and mode 2
Programming 8255
 Mode 0:
  — Ports A, B, and C can be individually programmed as input or output ports
  — Port C is divided into two 4-bit ports which are independent from each other

 Mode 1:
  — Ports A and B are programmed as input or output ports
  — Port C is used for handshaking

                         PA[7:0]                                PA[7:0]
            PC4         STBA                       PC7         OBFA
            PC5         IBFA                       PC6         ACKA
            PC3         INTRA                      PC3         INTRA
       8255             PB[7:0]               8255              PB[7:0]
            PC2         STBB                       PC2         OBFB
            PC1         IBFB                       PC1         ACKB
            PC0         INTRB                      PC0         INTRB
          PC6, 7                                 PC4, 5
Interfacing 8255
Interfacing 8255
Programming 8255
 Mode 2:
   — Port A is programmed to be bi-directional
   — Port C is for handshaking
   — Port B can be either input or output in mode 0 or mode 1

                                        PA[7:0]
                        PC7          OBFA
                        PC6          ACKA
                        PC4          STBA
               8255     PC5          IBFA
                        PC3          INTRA
                        PC0                          In    Out       STBB      OBFB
                        PC0                          In    Out       IBFB      ACKB
                        PC0                          In    Out       INTRB     INTRB
                                        PB[7:0]
                                                      Mode 0              Mode 1
  1.   Can you design a decoder for an 8255 chip such that its base address is 40H?
  2.   Write the instructions that set 8255 into mode 0, port A as input, port B as output,
       PC0-PC3 as input, PC4-PC7 as output ?
Timing diagram is a combination of the Mode 1 Strobed Input
and Mode 1 Strobed Output Timing diagrams.
Example: Mode 1 Input
                                       8255           keyboard
   BIT5        EQU     20H
                                          PA0
   PORTC       EQU     22H
   PORTA       EQU     20H               PA7


   READ        PROC NEAR
   Read:                                       STB
                                         PC4          DAV
    •   IN AL, PORTC    ; read portc
    •   TEST AL, BIT5   ;test IBF
    •   JZ Read         ;if IBF=0
    •   IN AL, PORTA    ;Read Data
   READ        ENDP
Example: Mode 1 output
    8255           Printer

       PB0

       PB7



             ACK             Data Strobe : to tell
      PC2          ACK       the printer to latch the
                             incoming data.
      PC4           DS
                             Generated Externally
Example: Mode 1 output
BIT1 EQU    2                   ;send character to printer
PORTC       EQU 62H             MOV AL, AH ;get data
                                OUT PORTB, AL ;print
PORTB       EQU 61H                data
CMD EQU     63H                 ; send data strobe to
PRINT       PROC NEAR              printer
  ; check printer ready?        MOV AL, 8 ;clear DS
  IN AL, PORTC ;get OBF         OUT CMD, AL
  TEST AL, BIT1 ;test OBF       MOV AL, 9 ;clear DS
  JZ PRINT ;if OBF=0 buffer     OUT CMD, AL
     is full                    ;rising the data at the
                                   positive edge of DS
                                RET
                              PRINT ENDP
Keyboard example 1/2
Keyboard example 2/2
Programmable Timer 8254
8254 Programming
8254 Programming

   Each counter may be programmed
    with a count of 1 to FFFFH.
    • Minimum count is 1 all modes except 2
      and 3 with minimum count of 2.
   Each counter has a program control
    word used to select the way the
    counter operates.
    • If two bytes are programmed, then the
      first byte (LSB) stops the count, and the
      second byte (MSB) starts the counter
      with the new count.
8254 Read Back Command
 8254 Read Back Command


    1      1    COUNT STATUS CNT2    CNT1   CNT0     0


 8254 status word format

         NULL
 OUTPUT COUNT    RW1    RW0    M2     M1     M0    BCD




  NULL COUNT: goes low when the new count written to a counter is
               actually loaded into the counter
8254 Modes

       Mode 0: An events counter enabled with G.
    •     The output becomes a logic 0 when the control word is
          written and remains there until N plus the number of
          programmed counts.




Mode 1: One-shot mode.
    •     The G input triggers the counter to output a 0 pulse for
          `count' clocks.
    •     Counter reloaded if G is pulsed again.
8254 Modes

   Mode 2: Counter generates a series of pulses 1 clock pulse
    wide.
    • The seperation between pulses is determined by the count.
    • The cycle is repeated until reprogrammed or G pin set to 0.




    • Mode 3: Generates a continuous square-wave with G set to 1.
           If count is even, 50% duty cycle otherwise OUT is high 1 cycle
            longer.
8254 Modes

   Mode 4: Software triggered one-shot
    • (G must be 1).




   Mode 5: Hardware triggered one-
    shot. G controls similar to Mode 1.

More Related Content

PPTX
PROGRAMMABLE KEYBOARD AND DISPLAY INTERFACE(8279).pptx
PPT
8255 presentaion.ppt
PPTX
8257 DMA Controller
PDF
Intel 8051 - pin description
PPT
pin-diagram-details-of-8086-microprocessor
PPT
Programming with 8085
PPT
Microcontroller-8051.ppt
PDF
interfacing of temperature sensor LM 35 with 8051.pdf
PROGRAMMABLE KEYBOARD AND DISPLAY INTERFACE(8279).pptx
8255 presentaion.ppt
8257 DMA Controller
Intel 8051 - pin description
pin-diagram-details-of-8086-microprocessor
Programming with 8085
Microcontroller-8051.ppt
interfacing of temperature sensor LM 35 with 8051.pdf

What's hot (20)

PPT
Architecture of 8086 Microprocessor
PPTX
Architecture of 8051
PDF
8051 microcontroller
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
PDF
Programmable Peripheral Interface 8255
PDF
Seven segment interfacing with 8051.pdf
PPT
8086 micro processor
PPT
Interfacing LCD with 8051 Microcontroller
PDF
8155 PPI
PPTX
Microprocessor 8086
PPTX
4.programmable dma controller 8257
PDF
8259 Programmable Interrupt Controller
PPTX
8051 Microcontroller ppt
PPT
UNIT III PROGRAMMABLE PERIPHERAL INTERFACE
PPTX
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
PPT
Addressing modes of 8051
PPTX
8251 USART
PDF
8051 interfacing
PPTX
Microprocessor 8085 complete
PDF
DAC Interfacing with 8051.pdf
Architecture of 8086 Microprocessor
Architecture of 8051
8051 microcontroller
8051 Microcontroller PPT's By Er. Swapnil Kaware
Programmable Peripheral Interface 8255
Seven segment interfacing with 8051.pdf
8086 micro processor
Interfacing LCD with 8051 Microcontroller
8155 PPI
Microprocessor 8086
4.programmable dma controller 8257
8259 Programmable Interrupt Controller
8051 Microcontroller ppt
UNIT III PROGRAMMABLE PERIPHERAL INTERFACE
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
Addressing modes of 8051
8251 USART
8051 interfacing
Microprocessor 8085 complete
DAC Interfacing with 8051.pdf
Ad

Viewers also liked (11)

PPT
8255_utkarsh_kulshrestha
PPTX
Timer
PPT
8085 interrupts
PPT
Control chap10
PDF
Notes nyquist plot and stability criteria
PPTX
Nyquist and polar plot 118 & 117
PDF
8085 interrupts
PPTX
8251 USART
PPTX
Interrupts of microprocessor 8085
PPT
Chapter 4 - Digital Transmission
8255_utkarsh_kulshrestha
Timer
8085 interrupts
Control chap10
Notes nyquist plot and stability criteria
Nyquist and polar plot 118 & 117
8085 interrupts
8251 USART
Interrupts of microprocessor 8085
Chapter 4 - Digital Transmission
Ad

Similar to Interfacing 8255 (20)

DOCX
Basics of peripheral devices and Working
PPTX
Interfacing of 8255 IC By Er. Swapnil Kaware.
PPT
Io (2)
PPT
Lecture_8255_MODIfggggggggggggFIED_BY_ME_24-11-2020.ppt
PDF
8085 lab
PPTX
L4-L6 8255 A.pptx
PPT
8255 PPI (programmable Peripheral Interface) mode 0
PPT
KTU_8255_Programmable Peripheral Interface
PPTX
UNIT- 3.pptx
PDF
Programmable Peripheral Devices
PPTX
2.instrumentation ii
PPT
Microprocessors 1-8086
PDF
8255 & IO Interfacing.pdf
PPTX
PPTX
UNIT 3 Peripheral Interfacing.pptx
PPT
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
PDF
Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pdf- MECHATRONICS-ENGGINERING
PDF
MPMC Unit-3 PPT.pdf
PPT
8255 class
PPTX
Basics Of Embedded Systems
Basics of peripheral devices and Working
Interfacing of 8255 IC By Er. Swapnil Kaware.
Io (2)
Lecture_8255_MODIfggggggggggggFIED_BY_ME_24-11-2020.ppt
8085 lab
L4-L6 8255 A.pptx
8255 PPI (programmable Peripheral Interface) mode 0
KTU_8255_Programmable Peripheral Interface
UNIT- 3.pptx
Programmable Peripheral Devices
2.instrumentation ii
Microprocessors 1-8086
8255 & IO Interfacing.pdf
UNIT 3 Peripheral Interfacing.pptx
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pdf- MECHATRONICS-ENGGINERING
MPMC Unit-3 PPT.pdf
8255 class
Basics Of Embedded Systems

Recently uploaded (20)

PDF
STKI Israel Market Study 2025 version august
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
The various Industrial Revolutions .pptx
PDF
Five Habits of High-Impact Board Members
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Hybrid model detection and classification of lung cancer
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
DOCX
search engine optimization ppt fir known well about this
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
STKI Israel Market Study 2025 version august
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
The various Industrial Revolutions .pptx
Five Habits of High-Impact Board Members
A comparative study of natural language inference in Swahili using monolingua...
Chapter 5: Probability Theory and Statistics
WOOl fibre morphology and structure.pdf for textiles
A review of recent deep learning applications in wood surface defect identifi...
Zenith AI: Advanced Artificial Intelligence
Hindi spoken digit analysis for native and non-native speakers
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Tartificialntelligence_presentation.pptx
Hybrid model detection and classification of lung cancer
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
search engine optimization ppt fir known well about this
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
DP Operators-handbook-extract for the Mautical Institute
Module 1.ppt Iot fundamentals and Architecture
Web Crawler for Trend Tracking Gen Z Insights.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf

Interfacing 8255

  • 1. PPI : 82C55  The 82C55 is a popular interfacing component, that can interface any TTL-compatible I/O device to the microprocessor.  It is used to interface to the keyboard and a parallel printer port in PCs (usually as part of an integrated chipset).  Requires insertion of wait states if used with a microprocessor using higher that an 8 MHz clock.  PPI has 24 pins for I/O that are programmable in groups of 12 pins and has three distinct modes of operation.  In the PC, an 82C55 or its equivalent is decoded at I/O ports 60H-63H.
  • 5. 8255 Programmable Peripheral Interface Data bus D[7:0] PA[7:0] A0 8086 A1 PB[7:0] RD Control port WR PC[7:0] RESET A7 CS A6 A5 A4 A3 A2 A1 A0 Port IO/M 0 0 PA 0 1 PB 1 0 PC 1 1 Control
  • 7. Programming 8255  8255 has three operation modes: mode 0, mode 1, and mode 2
  • 8. Programming 8255  Mode 0: — Ports A, B, and C can be individually programmed as input or output ports — Port C is divided into two 4-bit ports which are independent from each other  Mode 1: — Ports A and B are programmed as input or output ports — Port C is used for handshaking PA[7:0] PA[7:0] PC4 STBA PC7 OBFA PC5 IBFA PC6 ACKA PC3 INTRA PC3 INTRA 8255 PB[7:0] 8255 PB[7:0] PC2 STBB PC2 OBFB PC1 IBFB PC1 ACKB PC0 INTRB PC0 INTRB PC6, 7 PC4, 5
  • 11. Programming 8255  Mode 2: — Port A is programmed to be bi-directional — Port C is for handshaking — Port B can be either input or output in mode 0 or mode 1 PA[7:0] PC7 OBFA PC6 ACKA PC4 STBA 8255 PC5 IBFA PC3 INTRA PC0 In Out STBB OBFB PC0 In Out IBFB ACKB PC0 In Out INTRB INTRB PB[7:0] Mode 0 Mode 1 1. Can you design a decoder for an 8255 chip such that its base address is 40H? 2. Write the instructions that set 8255 into mode 0, port A as input, port B as output, PC0-PC3 as input, PC4-PC7 as output ?
  • 12. Timing diagram is a combination of the Mode 1 Strobed Input and Mode 1 Strobed Output Timing diagrams.
  • 13. Example: Mode 1 Input 8255 keyboard  BIT5 EQU 20H PA0  PORTC EQU 22H  PORTA EQU 20H PA7  READ PROC NEAR  Read: STB PC4 DAV • IN AL, PORTC ; read portc • TEST AL, BIT5 ;test IBF • JZ Read ;if IBF=0 • IN AL, PORTA ;Read Data  READ ENDP
  • 14. Example: Mode 1 output 8255 Printer PB0 PB7 ACK Data Strobe : to tell PC2 ACK the printer to latch the incoming data. PC4 DS Generated Externally
  • 15. Example: Mode 1 output BIT1 EQU 2 ;send character to printer PORTC EQU 62H MOV AL, AH ;get data OUT PORTB, AL ;print PORTB EQU 61H data CMD EQU 63H ; send data strobe to PRINT PROC NEAR printer ; check printer ready? MOV AL, 8 ;clear DS IN AL, PORTC ;get OBF OUT CMD, AL TEST AL, BIT1 ;test OBF MOV AL, 9 ;clear DS JZ PRINT ;if OBF=0 buffer OUT CMD, AL is full ;rising the data at the positive edge of DS RET PRINT ENDP
  • 20. 8254 Programming  Each counter may be programmed with a count of 1 to FFFFH. • Minimum count is 1 all modes except 2 and 3 with minimum count of 2.  Each counter has a program control word used to select the way the counter operates. • If two bytes are programmed, then the first byte (LSB) stops the count, and the second byte (MSB) starts the counter with the new count.
  • 21. 8254 Read Back Command  8254 Read Back Command 1 1 COUNT STATUS CNT2 CNT1 CNT0 0  8254 status word format NULL OUTPUT COUNT RW1 RW0 M2 M1 M0 BCD NULL COUNT: goes low when the new count written to a counter is actually loaded into the counter
  • 22. 8254 Modes  Mode 0: An events counter enabled with G. • The output becomes a logic 0 when the control word is written and remains there until N plus the number of programmed counts. Mode 1: One-shot mode. • The G input triggers the counter to output a 0 pulse for `count' clocks. • Counter reloaded if G is pulsed again.
  • 23. 8254 Modes  Mode 2: Counter generates a series of pulses 1 clock pulse wide. • The seperation between pulses is determined by the count. • The cycle is repeated until reprogrammed or G pin set to 0. • Mode 3: Generates a continuous square-wave with G set to 1.  If count is even, 50% duty cycle otherwise OUT is high 1 cycle longer.
  • 24. 8254 Modes  Mode 4: Software triggered one-shot • (G must be 1).  Mode 5: Hardware triggered one- shot. G controls similar to Mode 1.