Category Serial Communications

RS232

RS232 Specifications, Introduction

  • It’s asynchronous serial communication method. The word serial means, that the information is sent one bit at a time. Asychronous tells us that the information is not sent in predefined time slots. Data transfer can start at any given time and it’s the task of the receiver to detect when a message starts and ends. Asychronous communication has some advantages which are both discussed in the next paragraph.

RS232 Bit Streams

  • The information is sent bit by bit on a physical channel. The information must be broken up in data words. The length of a data word is variable. On PC’s a length between 5 and 8 bits can be selected. This length is the net information length of each word. For proper transfer, additional bits are added for synchronization and error checking purposes. It’s important that the transmitter and receiver use the same number of bits. Otherwise, the data word may be misinterpreted, or not recognized at all.
  • With synchronous communication, a clock or trigger signal must be present which indicates the beginning of each transfer. The absence of a clock signal makes an asynchronous communication channel cheaper to operate. Less lines are necessary in the cable. The disadvantage is, that the receiver can start at the wrong moment receiving the information. Re-synchronous is then needed which costs time. All data received in the re-synchronous period is lost. Another disadvantage is that extra bits are needed in the data stream to indicate the start and end of useful information. These extra bits take up bandwidth.
  • Data bits are sent with a predefined frequency, the baud rate. Both the transmitter and receiver must be programmed to use the same bit frequency. After the first bit is received, the receiver calculates at which moments the other data bits will be received. It will check the line voltage levels at those moments.
  • With RS232, the line voltage level can have two states. The ON state is also known as mark, the OFF state as space. No other line states are possible. When the line is idle, it’s kept in the mark state.

Start Bit

  • RS232 defines an asynchronous type of communication. This means, that sending of a data word can start on each moment. If starting at each moment is possible, this can pose some problems for the receiver to know which is the first bit to receive. To overcome this problem, each data word is started with an attention bit.

Ref: https://www.lammertbies.nl/comm/info/rs-232-specs#erro