CONTROL WORD FORMAT FOR 8255A

Here we will see the control word format for 8255A PPI IC. We already discussed in my previous post about “Programmable Peripheral Interface (PPI) IC 8255” and “OPERATIONAL MODES OF 8255 PPI IC”. Now we will see how can we tell microprocessor that which port of 8255 we use as input or output? As discussed above, a port can be programmed to act as an input port or an output port. To tell about that we generate a bit pattern or we may say a word which is called control word. A control word is, therefore, to be formed for programming the ports of 8255A.

The format for the control word format for 8255A is shown in figure bellow. As per the requirement of the programmer the control word is written into the control word register of 8255A. No read operation of the control word is allowed.

control word format for 8255A

So from above control word format for 8255A diagram we can see the bit wise function of control word generation. Now we go for further description of the control bits. We know in control word format it has 8 bits. And every bit responsible for respective work. Now see what are the work those bits do?

Bit D0 :

 Sets Port CLower as input or output port.

To make Port CLower as input port this bit is set to 1.

To make Port CLower as output port this bit is set to 0.

Bit D1:

 Sets Port B as input or output port.

To make Port B as input port this bit is set to 1.

To make Port B as output port this bit is set to 0.

Bit D2:

 This bit is for mode selection for the port B.

If this bit is set to 0, the port B will operate in mode 0.

If this bit is set to 1, the port B will operate in mode 1.

Bit D3:

Sets Port CUpper as input or output port.

To make Port CUpper as input port this bit is set to 1.

To make Port CUpper as output port this bit is set to 0.

Bit D4:

 Sets Port A as input or output port.

To make Port A as input port this bit is set to 1.

To make Port A as output port this bit is set to 0.

Bits D5 and D6 :

These two bits are used to determine the I/O mode of port A.

These bits are defined for the various modes of port A as follows:

D6         D5                  Mode of port A

0         0                   Mode 0

0         1                   Mode 1

1     0 or 1                Mode 2

Bit D7:

 This bit specifies either I/O function or bit set/reset function (BSR mode). If this bit is set to 1 then the 8255 will work in I/O mode. If this bit is set to 0 then the 8255 will work in BSR mode.

There are 16 combinations of control words for various configurations of the ports of 8255 for Mode 0 operations. These control words are shown in table.

control word format for 8255A

Now it will be excellent enough if we are go through some Example.

Obtain the control word when the ports of 8255A are to be used in mode 0 with port-A as output port and port B as input port and port C as output port.

Solution. The control word for this case is given as:

control word format for 8255A

Hope this discussion on control word format for 8255A , cleared your concept.

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *