Peripheral Programmable Interface

download Peripheral Programmable Interface

of 21

Transcript of Peripheral Programmable Interface

  • 8/17/2019 Peripheral Programmable Interface

    1/21

    PROGRAMMABLE

    PERIPHERAL INTERFACE

    -8255

    Features:  It is a programmable device.

      It has 24 I/O programmable pins like PA,P,P!"#$% pins&.

    • ' ' ( compatible.

    • Improved dc driving capabilit)

  • 8/17/2019 Peripheral Programmable Interface

    2/21

    Pin Diagram

  • 8/17/2019 Peripheral Programmable Interface

    3/21

    Function of pins:

     

    *ata bus"*+$*):'hese are %$bit bi$directionalbuses, connected to %+%- data bus ortranserring data.

     

    !: 'his is Active (o0 signal. 1hen it is lo0,then data is transer rom %+%-.

      ead: 'his is Active (o0 signal, 0hen it is (o0

    read operation 0ill be start.

      1rite: 'his is Active (o0 signal, 0hen it is (o0

    1rite operation 0ill be start.

  • 8/17/2019 Peripheral Programmable Interface

    4/21

    A1A1   A0A0   SelectSelect

    00   00   PAPA

    00   11   PBPB

    11   00   PCPC

    11   11  ControlControl

    reg.reg.

       Address "A+$A3&:'his is used to select the

    ports. like this

  • 8/17/2019 Peripheral Programmable Interface

    5/21

      ': 'his is used to reset the device. 'hatmeans clear control registers.

      PA+$PA:It is the %$bit bi$directional I/O pinsused to send the data to peripheral or 

      or to receive the data rom peripheral.

      P+$P:imilar to PA

      P!+$P!:'his is also %$bit bidirectional I/O pins.

    'hese lines are divided into t0o groups.3. P!+ to P!#"(o0er 5roups&

    2. P!4 to P! "6igher groups&

      'hese t0o groups 0orking in separatel) using 4

    data7s.

  • 8/17/2019 Peripheral Programmable Interface

    6/21

    Block Diagram

  • 8/17/2019 Peripheral Programmable Interface

    7/21

    Data Bus buffer :  It is a %$bit bidirectional *ata bus.

      8sed to interace bet0een %2-- data bus0ith s)stem bus.

      'he internal data bus and Outer pins *+$* 

    pins are connected in internall).

      'he direction o data buer is decided b)ead/!ontrol (ogic.

  • 8/17/2019 Peripheral Programmable Interface

    8/21

    Read/Write Control Logic:  This is getting the input signals from

    control bus and Address bus

      Control signal are RD and WR.

      Address signals are A0A!and C".

      #$%% operation is enabled or disabled b&

    C".

  • 8/17/2019 Peripheral Programmable Interface

    9/21

    5roup A and 5roup control:  5roup A and get the !ontrol

    ignal rom !P8 and send the command to theindividual control blocks.

    9 5roup A send the control signal to port A and Port! "8pper& P!$P!4.

    9 5roup send the control signal to port and Port! "(o0er& P!#$P!+.

    9 PO' A:9 'his is a %$bit buered I/O latch.

    9 It can be programmed b) mode + , mode 3, mode2 .

     

  • 8/17/2019 Peripheral Programmable Interface

    10/21

    PO' :  'his is a %$bit buer I/O latch.

      It can be programmed b) mode + and mode 3.

      PO' !:  'his is a %$bit 8nlatched buer Input and an

    Output latch.

      It is split$ed into t0o parts.

      It can be programmed b) bit set/reset

    operation.

  • 8/17/2019 Peripheral Programmable Interface

    11/21

    Operation modes:

    I' '/' O*:  'he PO' ! can be et or eset b) sending O8'instruction to the !O;'O( registers.

    I/O O*:  O* +"imple input / Output&:  In this mode , port A, port and port ! is used as

    individuall) "impl)&.

     

    Features:  Outputs are latched , Inputs are buered not

    latched.  Ports do not have 6andshake or interrupt

    capabilit).

  • 8/17/2019 Peripheral Programmable Interface

    12/21

      O* 3 :"Input/output 0ith 6and shake&

      In this mode, input or output is transerred b)

    hand shaking ignals.

     

    6andshaking signals is used to transer databet0een 0hose data transer is not same.

    Computer

    Printer  DATA BUS  STB  ACK 

      Bus

  • 8/17/2019 Peripheral Programmable Interface

    13/21

     

  • 8/17/2019 Peripheral Programmable Interface

    14/21

    O* 2:bi$directional I/O data transer:

      'his mode allo0s bidirectional data transer over

    a single %$bit data bus using handshake signals.  'his eature is possible onl) 5roup A

      Port A is 0orking as %$bi) bidirectional.

     

    P!#$P! is used or handshaking purpose.  'he data is sent b) !P8 through this port , 0hen

    the peripheral re=uest it.

     

    !O;'O( 1O* FOA':  In the I;P8' mode , 1hen ' is 6igh all

    24 pins "#$ports& be a input mode.

  • 8/17/2019 Peripheral Programmable Interface

    15/21

      i.e all lip lops are cleared and the interrupts are

    rest.

     

    'his condition is maintained even ater 'goes lo0.

      'his can be avoid b) 0riting single control 0ord

    to the control registers , 0hen re=uired.

  • 8/17/2019 Peripheral Programmable Interface

    16/21

    FO I' '/' O*:

      'his is bit set/reset control 0ord ormat.

      > > >

      *on7t care

      it select

     

    D' D( D% D) D* D$ D! D0

    0 ! $ * ) % ( '

    + 3 + 3 + 3 + 3

    + + 3 3 + + 3 3

    + + + + 3 3 3 3

    B!TS"T#$"S"T%&S"T'&$"S"T

    B!T S"T#$"S"T F(A

      &' Acti*e

  • 8/17/2019 Peripheral Programmable Interface

    17/21

      P!+$P! is set or reset as per the status o *+.

       A 0ord is 0ritten or each bit

     

    >>+333.

     

    P!4 is eset then control register 0ill be+>>>+3+++.

      > is a don7t care.

  • 8/17/2019 Peripheral Programmable Interface

    18/21

      FO I/O O*:

    'he mode ormat or I/O as sho0n in igure

    D

    7

    D

    6

    D

    5

    D

    4

    D

    3

    D

    2

    D

    1

    D

    0

    roup A

    Port C Upper

    %&!nput

    '&Output

    Port A

    %&!nput

    '&Output

    +odeselection

    ''&mode '

    '%&mode %

    %,&mode -

    roup B

    Port C (o.er

    %&!nput

    '&Output

    Port B

    %&!nput

    '&Output

    +ode selection

    '&mode '

    %&mode %

    +ode set/ag&%&Acti*e

  • 8/17/2019 Peripheral Programmable Interface

    19/21

      'he control 0ord or both mode is same.

      it * is used or speci)ing 0hether 0ord

    loaded in to it set/reset mode or odedeinition 0ord.

      *?3?ode deinition mode.

     

    *?+?it set/eset mode.

  • 8/17/2019 Peripheral Programmable Interface

    20/21

     T0ank ou

    @A

  • 8/17/2019 Peripheral Programmable Interface

    21/21

    Prepared 1

    Prof2$2K2Kumar