8255 is general purpose programmable peripheral interface. It is used with many microprocessors and microcontrollers for various purposes. The device has three 8-bit ports port A, port B and port C. These ports can be used as input or output. These ports are further divided in to two groups A and B. Each group further…