Control Word Format 8255
The 8255A has an 8 bit
control register. The contents of this
register called, the control word, decides the I/O function for each port. This register is not accessible for a read
operation.
control word for I/O modes |
When D0 = 0, port C Lower - output port
D0 = 1,
port C Lower - input port.
The bit D1 configures port B as an 8 bit wide input or
output
When D1 = 0, port B is output port.
D1 = 1,
port B is input port.
The bit D2 is the mode select bit for port B and the
lower 4 bits of port C.
D2 = 0, selects Mode 0
D2 = 1, selects Mode 1.
The bits D3 through D6 in the control register correspond to the
group A control.
Bits D3 and D4 of the control register are used to configure
the operation of the upper half of port C and complete port A.
When D3 = 0, port C upper is output port.
or D3 = 1,
port C upper is input port.
Similarly when D4 = 0, port A is output port.
or
D4 = 1, port A is input port.
The bits D5 and D6 are used to select among the three modes of
operation names mode 0, mode 1 and mode 2.
D6 D5 = 00 selects mode 0
=
01 selects mode 1
=
1x selects mode 2.
The last control
register bit D7 is the mode set flag, which is shown in Fig.3.
D7 = 1 selects I/O mode and
D7 = 0 selects BSR mode.
BSR Mode Control Word Register Format
The bit set/reset function is not really a control word. Instead, it allows individual bits of port C
to be set or reset. But only one bit can
be set or reset at a time. One of the
advantages of this mode is that individual bits of port C can be changed
without changing any of the others. This
is needed when port C is used to control the ON/OFF status of several external
devices.
For example, the
device connected to PC4 can be turned ON without
affecting the status of any devices connected to the other seven outputs.
The bit set/reset
function is used in mode 1 and 2 to enable interrupt outputs available in these
modes.
OPERATIONAL MODES OF 8255
OPERATIONAL MODES OF 8255
No comments:
Post a Comment