SlideShare a Scribd company logo
INTERFACING


       Presented By,
   Er. Swapnil Kaware,
    B.E.(Electronics),
 svkaware@yahoo.co.in
Basic Interfacing Concept

• Any application of Microprocessor Based system
  Requires the transfer of data between external
  circuitry to the Microprocessor and Microprocessor to
  the External circuitry. User can give information (i.e.
  input) to the Microprocessor using keyboard and user
  can see the result or output information from the
  Microprocessor with the help of display.

• Hence interfacing is used to exchange information
  between two different applications/devices.
Memory Mapped I/O

• Device address is of 16 Bit. means A0 to A15 lines are
  used to generate device address.
• MEMR and MEMW control signals are used to control
  read and write I/O operations.
• Data transfer is between Any register and I/O device.
• Maximum number of I/O devices are 65536.
• Decoding 16 bit address may requires more hardware.
• For e.g. MOV R M, ADD M,CMP M etc.
INTERFACING IN MEMORY MAPPED I/O
A15
A14                  D0    D0
A13                  D7    D7           PA0
A12                  A0    A0           PA7
A11                  A1    A1
A10                                     PB0
                  MEMR     RD
A9
                 MEMW      WR           PB7
A8
A7             RESET OUT   RESET
                                        PC0
A6
A5
A4
                            8255        PC7


A3                                 CS
A2
I/O Mapped I/O

• Device address is of 8 Bit. means A0 to A7 or A8 to A15
  lines are used to generate device address.
• IOR and IOW control signals are used to control read
  and write I/O operations.
• Data transfer is between Accumulator and I/O device.
• Maximum number of I/O devices are 256.
• Decoding 16 bit address may requires less hardware.
• For e.g. IN, OUT etc.
INTERFACING IN I/O MAPPED I/O
                        D0    D0
                        D7    D7           PA0
A7
                        A0    A0           PA7
A6                      A1    A1

                       IOR    RD           PB0
A5
                       IOW    WR           PB7
A4
                  RESET OUT   RESET
                                           PC0
A3

A2                             8255        PC7

                                      CS
8255 PPI
• The INTEL 8255 is a 40 pin IC having total 24 I/O
  pins. consisting of 3 numbers of 8 –bit parallel I/O
  ports (i.e. PORT A, PORT B,PORT C). The ports can
  be programmed to function either as a input port or
  as a output port in different operating modes. It
  requires 4 internal addresses and has one logic LOW
  chip select pin. Its main functions are to interface
  peripheral devices to the microprocessor. Basically
  used for parallel data transfer. operates in mainly
  two modes.
• (1) Bit Set Reset Mode (BSR Mode).
• (2) I/O Mode.
Block Diagram of 8255 PPI
 POWER              +5V                                    PA
 SUPPLIES           Ground                    GROUP A
                             GROUP A
                                             PORT A (8)
                             CONTROL                      PA7-PA0
 Bidirectional
 Data Bus
 D7- D0                                      GROUP A        PCU
                 DATA BUS
                  BUFFER                      PORT C
                                  8 Bit      UPPER (4)    PC7-PC4
                                  Internal
                                  Data Bus
                                              GROUP B       PCL
                                               PORT C
                                             LOWER (4)    PC3-PC0
                  READ/
RD
WR                WRITE
                             GROUP B                        PB
A0               CONTROL                      GROUP B
A1
                  LOGIC      CONTROL
RESET                                        PORT B (8)
                                                          PB7-PB0
            cs
Function of Blocks
  BLOCK                                   FUNCTION OF BLOCK

                  It is used to interface the internal data bus of 8255 to the
Data Bus Buffer   system data bus by reading and writing operations.
                  It accepts the input from the address bus and issues commands
 Read/write       to the individual group blocks. also issues appropriate enabling
 Control logic    signals to access the required data/control words/status words.

                  It can be programmed in three modes Mode0, Mode1 and
  Port A          Mode2.

                  It can be programmed in three modes Mode0 and Mode1.
  Port B

                  It can be programmed for Bit Set/reset operation.
  Port C
Pin Diagram of 8255 PPI




8255 Pin
Diagram
Function of Pins
   PIN                                   FUNCTION OF PIN

                 These are bidirectional, tri-state data bus lines are connected to the
                 system data bus. They are used to transfer data and control word
D0-D7 (Data Bus) from microprocessor (8085) to 8255 or receive data or status word
                 from 8255 to the 8085.


                   These are 8 Bit bidirectional I/O pins used to send data to output
                   device and to receive data from input device. It functions as an 8 Bit
PA0-PA7 (Port A)   data output latch/buffer when used in output mode and as an 8 Bit
                   data input latch/buffer when used in input mode.


                   These are 8 Bit bidirectional I/O pins used to send data to output
                   device and to receive data from input device. It functions as an 8 Bit
PB0-PB7 (Port B)   data output latch/buffer when used in output mode and as an 8 Bit
                   data input latch/buffer when used in input mode.
Function of Pins
  PIN                             FUNCTION OF PIN

           These are 8 bit bidirectional I/O pins divided into two groups PCL
           (PC3-PC) and PCU (PC7-PC4).these groups can individually transfer
PC0-PC7    data in or out when programmed for simple I/O, and used as
(Port C)   handshake signals when programmed for handshake or
           bidirectional modes.

           When this pin is low, the CPU can read data in the ports or the status
 RD        word through the data bus buffer.
           When this pin is low, the CPU can write data on the ports or in the
 WR        control register through the data bus buffer.

           This pin can be enabled for data transfer operation between the CPU
 CS        and 8255.

           This pin is used to reset 8255.i.e control register gets cleared and all
 RESET     the ports are set to the input mode.
Function of Pins
PIN                                 FUNCTION OF PIN

A0-A1        The selection of input port and control word register is done by
             using A0 and A1 pins In conjunction with RD and WR pins.

 A1     A0     RD      WR      CS            Operations
 0      0      0       1       0       PORT A TO DATA BUS
 0      1      0       1       0       PORT B TO DATA BUS
 1      0      0       1       0       PORT C TO DATA BUS
 0      0      1       0       0       DATA BUS TO PORT A
 0      1      1       0       0       DATA BUS TO PORT B
 1      0      1       0       0       DATA BUS TO PORT C
 1      1      1       0       0       DATA BUS TO CONTROL REGISTER
 x      x      x       x       1       DATA BUS TRI STATED
 1      1      0       1       0       ILLEGAL CONDITION
 x      x      1       1       0       DATA BUS TRI STATED
Operating Modes Of 8255
• There are two main operational modes of 8255:
(1) Input/output mode,
(2) Bit set/reset mode (BSR Mode).

I/O mode again classified into three types
• (1) Mode 0,
• (2) Mode 1,
• (3) Mode 2.
MODE 0
• In this mode, the ports can be used for simple input/output
  operations without handshaking.
• If both port A and B are initialized in mode 0, the two halves
  of port C can be either used together as an additional 8-bit
  port, or they can be used as individual 4-bit ports.
• Since the two halves of port C are independent, they may be
  used such that one-half is initialized as an input port while the
  other half is initialized as an output port.

The mode 0 has following features:

• O/p are latched.
• I/p are buffered not latched.
• Port do not have handshake or interrupt capability.
MODE 1
• When we wish to use port A or port B for handshake
  (strobed) input or output operation, we initialize that port in
  mode 1.
• For port B in this mode (irrespective of whether is acting as
  an input port or output port), PC0, PC1 and PC2 pins function
  as handshake lines.


The mode 1 has following features:
• Two ports i.e. port A and B can be use as 8-bit i/o port.
• Each port uses three lines of port c as handshake signal and
  remaining two signals can be function as i/o port.
• Interrupt logic is supported.
• Input and Output data are latched.
MODE 2
• Only group A can be initialized in this mode.
• Port A can be used for bidirectional handshake data
  transfer. This means that data can be input or output on
  the same eight lines (PA0 - PA7).
• Pins PC3 - PC7 are used as handshake lines for port A.
• The remaining pins of port C (PC0 - PC2) can be used as
  input/output lines if group B is initialized in mode 0.
• In this mode, the 8255 may be used to extend the
  system bus to a slave microprocessor.
Control Word Format in I/O Mode
0   D6   D5     D4   D3   D2   D1   D0   GROUP B
                                         PORT C (LOWER)
                                         1=I/P, 0=O/P
                                         PORT B
                                         1=I/P, 0=O/P
                                         MODE SELECTION
                                         0 = MODE 0
                                         1 = MODE 1

                                         GROUP A
                                         PORT C (UPPER)
                                         1=I/P, 0=O/P
                                         PORT A
                                         1=I/P, 0=O/P
                                         MODE SELECTION
                                         00 = MODE 0
MODE SET FLAG                            01 = MODE 1
1 = ACTIVE                               1X = MODE 2
Control Word Format in BSR Mode
0    D6   D5   D4    D3   D2   D1   D0
                                                          BIT SET/RESET
                                                          1 = SET
                                                          2 = RESET
     DON’T CARE


                                     BIT SELECT

                                         0   1    2   3    4    5   6     7
                                         0   1    0   1    0    1   0     1   B0
                                         0   0    1   1    0    0   1     1   B1
                                         0   0    0   0    1    1   1     1   B2




BIT SET/RESET FLAG
     0 = ACTIVE
Write a program to initialize 8255 in the configuration
 below.(assume address of the CW register as 83H).
 (1) Port A: simple input (2) Port B: simple output
        (3) Port CL: output (4)Port CU: input


• Solution:
 1      0   0        1    1    0     0    0
                                                = 98H
     Program:
                MVI A,98H ; LOAD CONTROL WORD

                OUT 83H   ; SEND CONTROL WORD
Write a program to initialize 8255 in the configuration
      below.(assume address of the CW register as 23H).
               (1) Port A: output with handshake
                (2) Port B: input with handshake
             (3) Port CL: output (4)Port CU: input


• Solution:
 1      0      1      0      1      1     1      0
                                                        = AEH
  Program:
               MVI A,AEH ; LOAD CONTROL WORD

               OUT 23H     ; SEND CONTROL WORD
Find the control word for the register arrangement
       of the ports of intel 8255 for mode 0 operation.
    • Port A: Output, Port B: Output,
    • Port CU: Output, Port CL: Output

     Solution:

1        0      0      0      0     0      0      0
                                                         = 80H

     The control word register for the above ports of intel
     8255 is 80H.
Find the control word for the register arrangement
       of the ports of intel 8255 for mode 0 operation.
    • Port A: Input, Port B: Input,
    • Port CU: Input, Port CL: Input

     Solution:

1        0      0      1      1     0      1      1
                                                         = 9BH

     The control word register for the above ports of intel
     8255 is 9BH.
END OF SESSION

          svkaware@yahoo.co.in

More Related Content

What's hot

23. serial and parallel data communication
23. serial and parallel data communication23. serial and parallel data communication
23. serial and parallel data communication
sandip das
 
Unit 2 mpmc
Unit 2 mpmcUnit 2 mpmc
Unit 2 mpmc
tamilnesaner
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
ShivamSood22
 
Programmableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 pptProgrammableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 ppt
sharan Kumar
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
Nahian Ahmed
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
International Institute of Information Technology (I²IT)
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
KanchanPatil34
 
PART -1 TRAFFIC LIGHT CONTROL USING 8085
PART -1 TRAFFIC LIGHT CONTROL USING 8085PART -1 TRAFFIC LIGHT CONTROL USING 8085
PART -1 TRAFFIC LIGHT CONTROL USING 8085
Subash Sambath Kumar
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
deval patel
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
Dr.YNM
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086aviban
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
sandip das
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
MdFazleRabbi18
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
hello_priti
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
techbed
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
Monica Gunjal
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
Albin Panakkal
 

What's hot (20)

23. serial and parallel data communication
23. serial and parallel data communication23. serial and parallel data communication
23. serial and parallel data communication
 
Unit 2 mpmc
Unit 2 mpmcUnit 2 mpmc
Unit 2 mpmc
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Programmableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 pptProgrammableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 ppt
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC InterfacingPIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
PART -1 TRAFFIC LIGHT CONTROL USING 8085
PART -1 TRAFFIC LIGHT CONTROL USING 8085PART -1 TRAFFIC LIGHT CONTROL USING 8085
PART -1 TRAFFIC LIGHT CONTROL USING 8085
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
 

Similar to Interfacing of 8255 IC By Er. Swapnil Kaware.

8255 PPI
8255 PPI8255 PPI
8255 PPI
deval patel
 
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
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
MdFazleRabbi18
 
8255 class
8255 class8255 class
8255 class
riyasekaran
 
Programmable peripheral interface 8255
Programmable peripheral interface 8255Programmable peripheral interface 8255
Programmable peripheral interface 8255
Marajulislam3
 
Mod-2 M&M.pptx
Mod-2 M&M.pptxMod-2 M&M.pptx
Mod-2 M&M.pptx
TechCook1
 
8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study
Sirisha Vamsi
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
363118864 8255-nptel
363118864 8255-nptel363118864 8255-nptel
363118864 8255-nptel
ZerihunDemere
 
PROGRAMMABLE PERIPHERAL INTERFACE (PPI) -8255
PROGRAMMABLE PERIPHERAL  INTERFACE (PPI) -8255PROGRAMMABLE PERIPHERAL  INTERFACE (PPI) -8255
PROGRAMMABLE PERIPHERAL INTERFACE (PPI) -8255
Zahid Parvez
 
8255 ppi.pptx
8255 ppi.pptx8255 ppi.pptx
8255 ppi.pptx
zahid235639
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
Suraj Bora
 
Io (2)
Io (2)Io (2)
Io (2)Aisu
 
unit-3-8255.pdf
unit-3-8255.pdfunit-3-8255.pdf
unit-3-8255.pdf
ShanmukhSaiR
 
8255_Ppi new
8255_Ppi new8255_Ppi new
8255_Ppi new
Monica Gunjal
 
Basics of peripheral devices and Working
Basics of peripheral devices and WorkingBasics of peripheral devices and Working
Basics of peripheral devices and Working
Dr.YNM
 
Microprocessor Basics 8085-8255 ch-5
Microprocessor Basics 8085-8255 ch-5Microprocessor Basics 8085-8255 ch-5
Microprocessor Basics 8085-8255 ch-5
Neelam Kapoor
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
ssuser47c811
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
Ilavarasan Tamizh
 
MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3
deepakdmaat
 

Similar to Interfacing of 8255 IC By Er. Swapnil Kaware. (20)

8255 PPI
8255 PPI8255 PPI
8255 PPI
 
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
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
 
8255 class
8255 class8255 class
8255 class
 
Programmable peripheral interface 8255
Programmable peripheral interface 8255Programmable peripheral interface 8255
Programmable peripheral interface 8255
 
Mod-2 M&M.pptx
Mod-2 M&M.pptxMod-2 M&M.pptx
Mod-2 M&M.pptx
 
8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
363118864 8255-nptel
363118864 8255-nptel363118864 8255-nptel
363118864 8255-nptel
 
PROGRAMMABLE PERIPHERAL INTERFACE (PPI) -8255
PROGRAMMABLE PERIPHERAL  INTERFACE (PPI) -8255PROGRAMMABLE PERIPHERAL  INTERFACE (PPI) -8255
PROGRAMMABLE PERIPHERAL INTERFACE (PPI) -8255
 
8255 ppi.pptx
8255 ppi.pptx8255 ppi.pptx
8255 ppi.pptx
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
 
Io (2)
Io (2)Io (2)
Io (2)
 
unit-3-8255.pdf
unit-3-8255.pdfunit-3-8255.pdf
unit-3-8255.pdf
 
8255_Ppi new
8255_Ppi new8255_Ppi new
8255_Ppi new
 
Basics of peripheral devices and Working
Basics of peripheral devices and WorkingBasics of peripheral devices and Working
Basics of peripheral devices and Working
 
Microprocessor Basics 8085-8255 ch-5
Microprocessor Basics 8085-8255 ch-5Microprocessor Basics 8085-8255 ch-5
Microprocessor Basics 8085-8255 ch-5
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
 
MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3
 

More from Prof. Swapnil V. Kaware

Corona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. KawareCorona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Basic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. KawrareBasic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. Kawrare
Prof. Swapnil V. Kaware
 
Addressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. KawareAddressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Best GD tips by, Er. Swapnil V. Kaware
Best GD tips by, Er. Swapnil V. KawareBest GD tips by, Er. Swapnil V. Kaware
Best GD tips by, Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Best Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. KawareBest Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Chandrayaan 2 By, Er. Swapnil V. Kaware
Chandrayaan 2 By, Er. Swapnil V. KawareChandrayaan 2 By, Er. Swapnil V. Kaware
Chandrayaan 2 By, Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. KawareLED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Combinational Logic Circuits
Combinational Logic CircuitsCombinational Logic Circuits
Combinational Logic Circuits
Prof. Swapnil V. Kaware
 
Microprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. KawareMicroprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
LED basics by Er. Swapnil V. Kaware
LED basics by Er. Swapnil V. KawareLED basics by Er. Swapnil V. Kaware
LED basics by Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Electronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. KawareElectronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. Kaware
Prof. Swapnil V. Kaware
 
Transistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil KawareTransistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil KawareBasic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Basic Electronics by Er. Swapnil Kaware
Basic Electronics by Er. Swapnil KawareBasic Electronics by Er. Swapnil Kaware
Basic Electronics by Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Digital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareDigital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Digital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil KawareDigital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareProf. Swapnil V. Kaware
 
Digital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareDigital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareProf. Swapnil V. Kaware
 

More from Prof. Swapnil V. Kaware (20)

Corona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. KawareCorona Virus Awareness by, Er. Swapnil V. Kaware
Corona Virus Awareness by, Er. Swapnil V. Kaware
 
Basic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. KawrareBasic Electronics By, Er. Swapnil V. Kawrare
Basic Electronics By, Er. Swapnil V. Kawrare
 
Addressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. KawareAddressing modes of 8085 by Er. Swapnil V. Kaware
Addressing modes of 8085 by Er. Swapnil V. Kaware
 
Best GD tips by, Er. Swapnil V. Kaware
Best GD tips by, Er. Swapnil V. KawareBest GD tips by, Er. Swapnil V. Kaware
Best GD tips by, Er. Swapnil V. Kaware
 
Best Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. KawareBest Interview Tips By, Er. Swapnil V. Kaware
Best Interview Tips By, Er. Swapnil V. Kaware
 
Chandrayaan 2 By, Er. Swapnil V. Kaware
Chandrayaan 2 By, Er. Swapnil V. KawareChandrayaan 2 By, Er. Swapnil V. Kaware
Chandrayaan 2 By, Er. Swapnil V. Kaware
 
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. KawareLED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
LED Lighting for Energy Efficiency By, Er. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
 
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
 
Combinational Logic Circuits
Combinational Logic CircuitsCombinational Logic Circuits
Combinational Logic Circuits
 
Microprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. KawareMicroprocessor Lab Manual by Er. Swapnil V. Kaware
Microprocessor Lab Manual by Er. Swapnil V. Kaware
 
LED basics by Er. Swapnil V. Kaware
LED basics by Er. Swapnil V. KawareLED basics by Er. Swapnil V. Kaware
LED basics by Er. Swapnil V. Kaware
 
Electronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. KawareElectronics Lab Manual by Er. Swapnil V. Kaware
Electronics Lab Manual by Er. Swapnil V. Kaware
 
Transistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil KawareTransistors & Oscillators by Er. Swapnil Kaware
Transistors & Oscillators by Er. Swapnil Kaware
 
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil KawareBasic Electronics (Rectifiers) by Er. Swapnil Kaware
Basic Electronics (Rectifiers) by Er. Swapnil Kaware
 
Basic Electronics by Er. Swapnil Kaware
Basic Electronics by Er. Swapnil KawareBasic Electronics by Er. Swapnil Kaware
Basic Electronics by Er. Swapnil Kaware
 
Digital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil KawareDigital Electronics Basics by Er. Swapnil Kaware
Digital Electronics Basics by Er. Swapnil Kaware
 
Digital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil KawareDigital computer Basics by, Er. Swapnil Kaware
Digital computer Basics by, Er. Swapnil Kaware
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil Kaware
 
Digital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil KawareDigital signal processing By Er. Swapnil Kaware
Digital signal processing By Er. Swapnil Kaware
 

Recently uploaded

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
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
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
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
 
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
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
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
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
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
 

Recently uploaded (20)

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
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
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .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
 
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.
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
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.
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
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
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
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
 

Interfacing of 8255 IC By Er. Swapnil Kaware.

  • 1. INTERFACING Presented By, Er. Swapnil Kaware, B.E.(Electronics), svkaware@yahoo.co.in
  • 2. Basic Interfacing Concept • Any application of Microprocessor Based system Requires the transfer of data between external circuitry to the Microprocessor and Microprocessor to the External circuitry. User can give information (i.e. input) to the Microprocessor using keyboard and user can see the result or output information from the Microprocessor with the help of display. • Hence interfacing is used to exchange information between two different applications/devices.
  • 3. Memory Mapped I/O • Device address is of 16 Bit. means A0 to A15 lines are used to generate device address. • MEMR and MEMW control signals are used to control read and write I/O operations. • Data transfer is between Any register and I/O device. • Maximum number of I/O devices are 65536. • Decoding 16 bit address may requires more hardware. • For e.g. MOV R M, ADD M,CMP M etc.
  • 4. INTERFACING IN MEMORY MAPPED I/O A15 A14 D0 D0 A13 D7 D7 PA0 A12 A0 A0 PA7 A11 A1 A1 A10 PB0 MEMR RD A9 MEMW WR PB7 A8 A7 RESET OUT RESET PC0 A6 A5 A4 8255 PC7 A3 CS A2
  • 5. I/O Mapped I/O • Device address is of 8 Bit. means A0 to A7 or A8 to A15 lines are used to generate device address. • IOR and IOW control signals are used to control read and write I/O operations. • Data transfer is between Accumulator and I/O device. • Maximum number of I/O devices are 256. • Decoding 16 bit address may requires less hardware. • For e.g. IN, OUT etc.
  • 6. INTERFACING IN I/O MAPPED I/O D0 D0 D7 D7 PA0 A7 A0 A0 PA7 A6 A1 A1 IOR RD PB0 A5 IOW WR PB7 A4 RESET OUT RESET PC0 A3 A2 8255 PC7 CS
  • 7. 8255 PPI • The INTEL 8255 is a 40 pin IC having total 24 I/O pins. consisting of 3 numbers of 8 –bit parallel I/O ports (i.e. PORT A, PORT B,PORT C). The ports can be programmed to function either as a input port or as a output port in different operating modes. It requires 4 internal addresses and has one logic LOW chip select pin. Its main functions are to interface peripheral devices to the microprocessor. Basically used for parallel data transfer. operates in mainly two modes. • (1) Bit Set Reset Mode (BSR Mode). • (2) I/O Mode.
  • 8. Block Diagram of 8255 PPI POWER +5V PA SUPPLIES Ground GROUP A GROUP A PORT A (8) CONTROL PA7-PA0 Bidirectional Data Bus D7- D0 GROUP A PCU DATA BUS BUFFER PORT C 8 Bit UPPER (4) PC7-PC4 Internal Data Bus GROUP B PCL PORT C LOWER (4) PC3-PC0 READ/ RD WR WRITE GROUP B PB A0 CONTROL GROUP B A1 LOGIC CONTROL RESET PORT B (8) PB7-PB0 cs
  • 9. Function of Blocks BLOCK FUNCTION OF BLOCK It is used to interface the internal data bus of 8255 to the Data Bus Buffer system data bus by reading and writing operations. It accepts the input from the address bus and issues commands Read/write to the individual group blocks. also issues appropriate enabling Control logic signals to access the required data/control words/status words. It can be programmed in three modes Mode0, Mode1 and Port A Mode2. It can be programmed in three modes Mode0 and Mode1. Port B It can be programmed for Bit Set/reset operation. Port C
  • 10. Pin Diagram of 8255 PPI 8255 Pin Diagram
  • 11. Function of Pins PIN FUNCTION OF PIN These are bidirectional, tri-state data bus lines are connected to the system data bus. They are used to transfer data and control word D0-D7 (Data Bus) from microprocessor (8085) to 8255 or receive data or status word from 8255 to the 8085. These are 8 Bit bidirectional I/O pins used to send data to output device and to receive data from input device. It functions as an 8 Bit PA0-PA7 (Port A) data output latch/buffer when used in output mode and as an 8 Bit data input latch/buffer when used in input mode. These are 8 Bit bidirectional I/O pins used to send data to output device and to receive data from input device. It functions as an 8 Bit PB0-PB7 (Port B) data output latch/buffer when used in output mode and as an 8 Bit data input latch/buffer when used in input mode.
  • 12. Function of Pins PIN FUNCTION OF PIN These are 8 bit bidirectional I/O pins divided into two groups PCL (PC3-PC) and PCU (PC7-PC4).these groups can individually transfer PC0-PC7 data in or out when programmed for simple I/O, and used as (Port C) handshake signals when programmed for handshake or bidirectional modes. When this pin is low, the CPU can read data in the ports or the status RD word through the data bus buffer. When this pin is low, the CPU can write data on the ports or in the WR control register through the data bus buffer. This pin can be enabled for data transfer operation between the CPU CS and 8255. This pin is used to reset 8255.i.e control register gets cleared and all RESET the ports are set to the input mode.
  • 13. Function of Pins PIN FUNCTION OF PIN A0-A1 The selection of input port and control word register is done by using A0 and A1 pins In conjunction with RD and WR pins. A1 A0 RD WR CS Operations 0 0 0 1 0 PORT A TO DATA BUS 0 1 0 1 0 PORT B TO DATA BUS 1 0 0 1 0 PORT C TO DATA BUS 0 0 1 0 0 DATA BUS TO PORT A 0 1 1 0 0 DATA BUS TO PORT B 1 0 1 0 0 DATA BUS TO PORT C 1 1 1 0 0 DATA BUS TO CONTROL REGISTER x x x x 1 DATA BUS TRI STATED 1 1 0 1 0 ILLEGAL CONDITION x x 1 1 0 DATA BUS TRI STATED
  • 14. Operating Modes Of 8255 • There are two main operational modes of 8255: (1) Input/output mode, (2) Bit set/reset mode (BSR Mode). I/O mode again classified into three types • (1) Mode 0, • (2) Mode 1, • (3) Mode 2.
  • 15. MODE 0 • In this mode, the ports can be used for simple input/output operations without handshaking. • If both port A and B are initialized in mode 0, the two halves of port C can be either used together as an additional 8-bit port, or they can be used as individual 4-bit ports. • Since the two halves of port C are independent, they may be used such that one-half is initialized as an input port while the other half is initialized as an output port. The mode 0 has following features: • O/p are latched. • I/p are buffered not latched. • Port do not have handshake or interrupt capability.
  • 16. MODE 1 • When we wish to use port A or port B for handshake (strobed) input or output operation, we initialize that port in mode 1. • For port B in this mode (irrespective of whether is acting as an input port or output port), PC0, PC1 and PC2 pins function as handshake lines. The mode 1 has following features: • Two ports i.e. port A and B can be use as 8-bit i/o port. • Each port uses three lines of port c as handshake signal and remaining two signals can be function as i/o port. • Interrupt logic is supported. • Input and Output data are latched.
  • 17. MODE 2 • Only group A can be initialized in this mode. • Port A can be used for bidirectional handshake data transfer. This means that data can be input or output on the same eight lines (PA0 - PA7). • Pins PC3 - PC7 are used as handshake lines for port A. • The remaining pins of port C (PC0 - PC2) can be used as input/output lines if group B is initialized in mode 0. • In this mode, the 8255 may be used to extend the system bus to a slave microprocessor.
  • 18. Control Word Format in I/O Mode 0 D6 D5 D4 D3 D2 D1 D0 GROUP B PORT C (LOWER) 1=I/P, 0=O/P PORT B 1=I/P, 0=O/P MODE SELECTION 0 = MODE 0 1 = MODE 1 GROUP A PORT C (UPPER) 1=I/P, 0=O/P PORT A 1=I/P, 0=O/P MODE SELECTION 00 = MODE 0 MODE SET FLAG 01 = MODE 1 1 = ACTIVE 1X = MODE 2
  • 19. Control Word Format in BSR Mode 0 D6 D5 D4 D3 D2 D1 D0 BIT SET/RESET 1 = SET 2 = RESET DON’T CARE BIT SELECT 0 1 2 3 4 5 6 7 0 1 0 1 0 1 0 1 B0 0 0 1 1 0 0 1 1 B1 0 0 0 0 1 1 1 1 B2 BIT SET/RESET FLAG 0 = ACTIVE
  • 20. Write a program to initialize 8255 in the configuration below.(assume address of the CW register as 83H). (1) Port A: simple input (2) Port B: simple output (3) Port CL: output (4)Port CU: input • Solution: 1 0 0 1 1 0 0 0 = 98H Program: MVI A,98H ; LOAD CONTROL WORD OUT 83H ; SEND CONTROL WORD
  • 21. Write a program to initialize 8255 in the configuration below.(assume address of the CW register as 23H). (1) Port A: output with handshake (2) Port B: input with handshake (3) Port CL: output (4)Port CU: input • Solution: 1 0 1 0 1 1 1 0 = AEH Program: MVI A,AEH ; LOAD CONTROL WORD OUT 23H ; SEND CONTROL WORD
  • 22. Find the control word for the register arrangement of the ports of intel 8255 for mode 0 operation. • Port A: Output, Port B: Output, • Port CU: Output, Port CL: Output Solution: 1 0 0 0 0 0 0 0 = 80H The control word register for the above ports of intel 8255 is 80H.
  • 23. Find the control word for the register arrangement of the ports of intel 8255 for mode 0 operation. • Port A: Input, Port B: Input, • Port CU: Input, Port CL: Input Solution: 1 0 0 1 1 0 1 1 = 9BH The control word register for the above ports of intel 8255 is 9BH.
  • 24. END OF SESSION svkaware@yahoo.co.in