Can we use 8255A (programmable peripheral interface) as a 24 bit input or 24 bit output? we know there are 3 ports PORT A,B and C each of 8 bits. How they can be used as 24 bits I/O ports?
You cannot address all 24 bits at the same time (e.g. a 24-bit data bus). Only one of the eight-bit three ports (A, B, C) an be addressed at a time. This is done using address bits A0 and A1. The data bus of the 8255 is only 8-bits wide (D0 through D7).
A1 A0 ----- 0 0 Port A 0 1 Port B 1 0 Port C 1 1 control register
The control register determines whether the bits in the various register are used as input or output or handshaking.