 Hello, Myself Ravindra Chauhan, Assistant Professor, Department of Electronics Engineering, Walshand Institute of Technology, Solapur. So in this session, we will discuss how the parallel slave port in peak 16 year of 877 operates. The outcome from this session, at the end of this session, student can demonstrate the operation of parallel slave port in peak 16 year of 877. Student can also implement the multiprocessor systems using the parallel slave port. Outline of these sessions are, first the PSP special function registers and operation of parallel slave port. The parallel slave port in peak 16 year of 877. So, port D of peak 16 year of 877 operates as an 8 bit parallel slave port. Now what do you mean by a slave port? Slave port means it is mainly used in the multiprocessor system where the system is having the one master who is initiating all the communication sessions and some other slave devices are interfaced with the master. So, master is one who is always initiating all the sessions in the system. So, slave port always return or read by the master device. So, in the peak 16 year of 877, port D we can operate in a parallel slave port mode. In slave mode, port D is readable and writable by the external world that is by the master through the control input pin defined at RE0 slash RD bar and RE1 slash write bar. The parallel slave port can directly interface to an 8 bit microprocessor data bus. The external microprocessor can read or write the port D latch as an 8 bit latch. The pin RE0 slash RD bar, RE1 slash write bar, RE2 slash CS bar. These pins of the peak 16 year of 877 must be configured as an input pin to operate the port D in parallel slave mode. So, for this to configure these three pins as an input pin, you have to make the use of trace E register. So, the corresponding data direction bits of the trace E means the trace E bit 2 to 0 must be configured as an input. That means this bit 2 to bit 0 of trace E must be set. A write to the PSP occurs when both CS bar and write bar lines are first detected low. And when CS bar and read bar these two control signals are detected as a low. That means the read operation has been occurred on the parallel slave port. Now this is the bit format of trace E register which needs to be used to control the operation of parallel slave port. So, the lower three bits that is bit 2, bit 1, bit 0 these three bits are used to decide the direction of the three lower bits of the port E register. Then the MSB bit is called the IBF that is input buffer full status bit. Now this IBF bit will be set whenever the world has been received and is waiting to be read by the peak controller. IBF is 0 means no world has been received. OBF that is called the output buffer full status bit. Means OBF will be set means the peak has written the byte in the output buffer of parallel slave port. And 0 means the output buffer has been read by the master. IBOE which is called the input buffer overflow detect bit. So, IBOE will be set when a write occurred when a previously input word has not been read. So, this bit must be cleared in software. 0 means no overflow occurred. Now to decide the mode for the port D we have to make the use of the bit PSP mode. So, PSP mode is to be set when we need this port D to operate in a parallel slave mode. PSP mode if we are resetting in that case port B will functions in general purpose input output mode. And bit 2 to bit 0 will decide the port E direction bits. So, to configure the pin read bar write bar and the chip select bar these 3 bits must be set. So, these 3 control pins will be configured as a input pins. Then this diagram explains how the PSP can operate. So, in the multiprocessor system the one is this master device and the peak will work as a slave. So, all the times master is initiating the any communication session in the system. So, the data bus of the master we can directly connected to the port D of the peak microcontroller. And these 3 control signals are there read bar write bar and CS bar. When read bar is 0 and the CS bar is 0 means master is reading the byte from this slave peak. And when write bar is 0 and CS bar is 0 means the master is writing the byte into the slave peak. And read bar and write bar are 0 this condition never occurs in the system. The PSP operation so the PSP operations are mainly consists of read operation and write operation. So, only 2 operations are possible with the slave port that is the read or write. So, the PSP read operation here the first peak microcontroller puts the data in port D output buffer and it set the obf flag. Then the master initiates the read cycle by making the read and chip select control signals low. And then the data from port D output buffer puts on the data bus and stored into master and obf flag will be reset. Means master is reading the data from port D slave port. In write operation first master initiates the read cycle by making the write bar and CS bar these 2 control signals low. Then master puts the data on the data bus then data from data bus stored into port D input buffer and obf flag will be set. And then peak microcontroller reads the port D input buffer and obf flag will be reset. Now you think and write when obf flag from TRIS E register set. obf flag from TRIS E register set when master writes the new data in port D output buffer while previously input data has not been read by peak. And this obf must be cleared in software. So to summarize this in the multiprocessor system we can make the use of this peak microcontroller as a slave port. And this slave port can be used along with the any 8 bit processor because the port D which work as a parallel slave port is of 8 bit. So this parallel slave port always read or write by the master device in the system. In the read operation the data will flow from the parallel slave port to the master device. And in write operation the data will flow from the master device into the peak port D slave port. References used for these sessions the data sheet of peak 16 of 877 and the book called microcontrollers by Ajay Deshmukh. Thank you.