 This is Vishwana Chauhan, Assistant Professor, Department of Computer Science and Engineering, Walsh and Institute of Technology, SolarPort. Now I am here to explain IC8255, which is Programmable Peripheral Interface. At the end of this session, the students will be able to describe the block diagram of 8255, which is Programmable Peripheral Interface. As well as, they will be able to explain the control over format of 8255. Let us see the pin layout of 8255. This is 40 pin IC, which is having 8 ports, 8 bit ports PA01234567 port A, then port B, PB012327 and port C, PC01234567. Like this, there are 3 ports and data pins D02 D7. Apart from this, it has read-write pin, chip select pin, ground and VCC for power supply, reset. Like this, total it has 40 pins. We will see the details about all these pins. It has 3 ports, port A, port B and port C. And those respective pins are PA02PA7 for port A, PB02PB7 for port B, PC02PC7 for port C. It has data bits D02 D7. It has active low read pin as well as write pin for reading and writing purpose. Active low pin chip select, which is able to select the 8255. Then for power supply, VCC and ground. It has pin A0 and A1, which are used for selection of ports and reset pin. Moving to next topic, we will see the block diagram of 8255. It has port A, which is 8 bit, which falls under group A. Then port C upper part, whose width is 4 bit, which falls under group A. Then it has port C lower part, 4 bit width, which falls under group B. Then port B, whose width is 8 bit, which falls under group B. So these 3 ports are controlled by the respective control group. Group A controls port A and port C upper. And group B controls port C lower and port B. There is a data bus buffer, which is used to store the data, which is flowing in out from this buffer towards ports and external device. There is a read write control logic, which sends the appropriate signal for reading and writing purpose. Now this is the connection between ports and control groups as well as with respective data bus buffer. Now these are the signals generated by read write logics, which is connected to all the units so that it coordinates in proper way. It requires a plus 5 volt power supply. So this is about the block diagram of A to 55. Moving to next topic, which talks about the selection of ports. Since we saw 3 ports, port A, B and C, along with there is one control register. Now all these 4 selection will be carried out by respective pins A1 and A1, A2. Having the respective values 00 for port A, 01 for port B, 10 for port C and 11 for control register. Let us have a glance on control word format of A to 55. Now control word format is having 8 bit width D0 to D7. So normally it supports for 2 different cases. One based on in and out. And second one is bit set and reset. This D7 position talks about which type of format it is. Now D0 will explain all these 8 bits one by one. D0 bit which supports for port C lower part. And if this pin is at 1, it acts as input. If it is 0, it acts as output. Then next D1 which supports for port B. And it is similarly if it is 1 input, if it is 0 output. No, D0 is port C lower and D1 is port B. These two ports are managed by or it is coordinated by the mode selection bit which is D2. So if D2 is 0, then it acts under mode 0. If it is 1, then these ports act as mode 1. Then next coming to next bit D3. D3 is having port C upper part. If it is 1, it acts as input. If it is 0, it acts as output. And D4 bit which supports for port A. If it is 1, it acts as 0. If it is 0, then output. So these two ports, port C and port A are managed by defined D6 bits for mode selection. If it is 0, 0, defined D6 bits respectively. If it is 0, 0, then which falls under mode 0. If it is 0, 1, which falls under mode 1. If it is 1, X which indicates mode 2. Lastly the bit D7. Mode set flag. If it is 1, then it is in IO mode. If it is 0, then it is under bit set and reset mode. So bit D0 and D1 which is port C lower and port B falls under group B already known in previous slides. And port C upper and port A are controlled by group A. This is about input output mode. So coming, so let us have a glance on the question. Think and write the answer for this question. I see A255 has how many ports? Which group controls those ports? Pause the video and write down the answer. I hope your answer. I see A255 has three ports. Port A and port C upper part are controlled by group A. Port B and port C lower part are controlled by group B. Now let us see the next bit set and reset format. Which is having 8 bit format D0 to D7. Among these D1 and D2, D3, they are defined like this. 0, 0, 0, 2 up to 1, 1, 1. So these are the respective values which correspond to port C. So 0, 0, 0 indicates bit 0 of port C that is C0. Next C1, C2, C3, C4, C5, C6, C7 like this. So these three bits are reserved for specifying particular bit of that port C. D0 bit talks about setting and resetting. If this D0 bit is 1, then set. If it is 0, then reset. Then coming to next bit, D4, D5, D6. These three bits are not used. And D7 talks about whether it is input output mode or bit set reset mode. Since it is in bit set reset mode, it should be 0. For example, say if D1, D2, D3 is a 0, 1, 1 that indicates bit 3 of port C. That is C3. Now C3 bit will be set or reset based on D0 condition. These are the references. Thank you.