 Hello and welcome to the video lecture on RS232 standard. Learning outcome of this session. By the end of this session, student will be able to illustrate RS232 standard, null modem pin configuration and the use of biasconf function to make the port setting using control word to send the data and check the status of the port. You may pause here the video and write down what are the types of serial communication. Some of the types of serial communication are the well-known type is USB, then I2C and SPI. These are the some of the serial communication types. The RS232 standard is a asynchronous serial communication method developed by Electronic Industry Association. RS232 standard uses clock on both the sides that is on receiver as well as on the transmitter side along with start and stop bit. Additionally, you can use a parity bit with the start and stop bit for the error corrections. The RS232 standard works at physical layer of the ISO OSI communication standard. This layer is the lowest layer and the one that physically connects the devices to each other. The RS232 communication is done through the serial port of the computer. The RS232 connector comes with 25 pins as well as with 9 pins. 25 pin connector is old and while 9 pin connector is a new layer available. In both the cases with 25 pin connector as well 9 pin connectors only 9 pin at most are used. The RS232 specify the communication system characteristics of the hardware such as voltage levels, terminating resistances, cable length and so on. The standard does not deal with the software protocol or data framing, data addressing and errors. This is a diagram of DB9 pin assignment. Here you can see the D-type connector with 9 pins and we will see the each pin and its designation. The pin number one is DCD, data carrier detector. The pin number two is received data. Pin number three is transmit data. Pin number four is data terminal ready. Pin number five is ground. Pin number six is data set ready. Pin number seven is request to send. Pin number six is clear to send and the last pin is ring indicator. Here the numbers in the parenthesis indicates the pin number of these pins for DB25 connector. We will see the each pin description in detail. The second pin is carrier detector that is pin number one. After a data terminal is detected, a signal is sent to the data set that is going to be transmitted to the signal. The second pin is received data. This line carries the serial data from the serial host. The another pin is transmit data. This line also carries the data. Data terminal ready that is DTR. The signal line is asserted to the signal that has been powered on and is ready to operate. Asserted means it is at high voltages. The next pin is ground pin. This line establishes a common reference point for all the interface voltages. The next pin is data set ready. This signal ensures that serial communication between the two data terminal is completed. The next pin is RTS. When this signal is asserted, indicates that the device is ready to accept the serial data and when it is unasserted, indicates that it is no longer ready to accept the serial data. The next pin is clear to send, CTS. When this pin is asserted, indicates that the serial host is ready to accept serial data and when it is unasserted, signal indicates that data transmission should be disabled. The last pin is ring indicator. When this ring indicator pin is asserted, indicates that you have a ringing signal being received on your communication channel. We will see Null Modem in detail. Null Modem is used to connect two DTE devices to each other. Null Modem is used to transfer file between computer using protocols like Zmodem protocol or Xmodem protocol. The DTR pin is looped back to DSR and carrier detect on both the computers. We can use DB9 connector as a Null Modem by looping back data set ready and carrier detector pins to each other. Another pin configuration to be made is the DTR pin when it is asserted is active then data set ready and carrier detector immediately become active. Hence the computer thinks the virtual modem to which it is connected is ready and has detected the carrier of the other modem and it is ready for receiving or transmitting the data. This is figure number 2. Here you can see the Null Modem wiring. Pin number 6, 1 and 4 on both the sides are looped back as I have said earlier. The pin number 7 and pin number 8 are shorted and pin number 5 of both the sides are connected to each other to give a common ground reference. Pin number 3 is connected to pin number 2 and pin number 2 on the other side is connected to pin number 3 simply the three lines transmit data receive data and ground pins of each other of the two sides are connected to each other. Pin number 7 and pin number 8 are CTS and RTS pins are shorted while DTA data terminal ready data set ready and carrier detector. Pin number 6, 1 and 4 are looped back on the both side. We will see how to use the BIOS COM function with RS232 standard. The BIOS COM function is used in a serial communication while using RS232 connectors. First of all before sending the data we have to configure the port with the setting depending on our needs and availability. Same function is used to configure the initial setting using control word and the same BIOS COM function is used to send the data to the port as well as to check the status of the port. These actions, these actions means setting a control word, sending the data and checking the status of the port are distinguished and defined using the first parameter of the function that well the value we are going to pass to the BIOS COM function while programming. Along with that we are sending data and the port to be used to communicate. Null modem is used to connect two DTs to each other. Null modem is not used to connect DC to the DT device. Here you can see the BIOS COM function is declared. It has three parts. First is command, second is A byte and the third is port. ID. We will see these three parts in detail. The first part is command. Here you can see the value you can pass from 0 to 3 to configure to send the data or to receive the data return the current status of the communication port these values and their action is mentioned over here. If you pass command 0 then you want to initialize the parameters of the port. If you pass value 1 you want to send the character to the port if you pass value 2 you can receive the data and if you value if you pass the value 3 you can get the current status of the communication port. The second part is port ID. The port to which the data is to be sent or from which it is to be read is mentioned by these values. If you want to use COM port 1 then you have to pass the value 0 if you want to use COM port 2 you have to pass the value 1 if you want to use COM port 3 then you have to pass the value 2. The third part of the BIOS COM function is Abyte when you select the command 2 or 3 means if you want to send the data or receive the data then Abyte value is ignored but when command 0 is used that is setting the port values Abyte is nothing but or combination of the following bits you have to use one Abyte value from each group we will see these bits in the next slide how these are the values of Abyte by orring these values we are going to take a single value from each section here we have four sections and we are going to or these four values for example if Abyte value is 8B these values are hexadecimal then we are going to use board rate of 1200 then we are going to use odd parity one stop bit and 8 data bits now to initialize the port with above setting as I have said earlier we have to write BIOS COM 0 then 8B and 0 this is this BIOS COM command this is the declaration syntax of your BIOS COM function this 0 value indicates that you are going to configure your port with board rate of 1200 8 data bits odd parity and 1 stop and start bit to send the data to the COM port 1 the format of the function will be BIOS COM 1, data, 0 here as you are using the command 1 that's why the Abyte value next to the command is ignored similarly if you want to receive the value then you have to write BIOS COM 2, 0, 0 this will read the data byte from the port and these values you have to pass to the BIOS COM function while programming these are the references thank you