8255 Operating Modes
1.
Bit set reset (BSR) mode – This mode is used to set or reset the bits of port C
only. This mode affects only one bit of port C at a time because, as user set
the bit, it remains set until and unless user changes it.
Bit D7: 0 for BSR mode and
1 for I/O mode.
Bit
D6, D5 and D4: Don’t care bits
Bit
D3, D2 and D1: Port C bit select Bit
D3
|
D2
|
D1
|
Bit
|
0
|
0
|
0
|
Bit 0
|
0
|
0
|
1
|
Bit 1
|
0
|
1
|
0
|
Bit 2
|
0
|
1
|
1
|
Bit 3
|
1
|
0
|
0
|
Bit 4
|
1
|
0
|
1
|
Bit 5
|
1
|
1
|
0
|
Bit 6
|
1
|
1
|
1
|
Bit 7
|
Bit
D0:
0 for reset and
1 for set
2. Input/output mode (I/O) or Control word register
– This
mode is selected when the most significant bit (D7) in the control register is
1.
·
Mode 0 – Simple or basic I/O mode:
Port A, B and C can work either as input function or as output function. The outputs are latched but the inputs are not latched.
Port A, B and C can work either as input function or as output function. The outputs are latched but the inputs are not latched.
It has interrupt handling capability.
·
Mode 1 – Handshake or strobbed I/O:
In this either port A or B can work and port C bits are used to provide handshaking.
In this either port A or B can work and port C bits are used to provide handshaking.
The outputs as well as inputs are latched.
It has interrupt handling capability.
Before actual data transfer there is transmission
of signal to match speed of CPU and printer.
·
Mode 3 – Bidirectional I/O:
In this mode only port A will work, port B can either is in mode 0 or 1 and port C bits are used as handshake signal.
In this mode only port A will work, port B can either is in mode 0 or 1 and port C bits are used as handshake signal.
The outputs as well as
inputs are latched.
It has interrupt
handling capability.
D7
|
D6
|
D5
|
D4
|
D3
|
D2
|
D1
|
D0
|
1
|
GA Mode
|
PA
|
PCU
|
GB Mode
|
PB
|
PCL
|
No comments:
Post a Comment