Version 1.0, August 31, 2001, Copyright, Hugh Jack 1993-2001

31.4 SERIAL COMMUNICATIONS

 

· Serial communication channels send data one bit at a time.

 

· These techniques are often slower, but are essential when transmitting using radio waves, telephone lines, or similar media.

 

· Serial lines have become one of the most common methods for transmitting data to instruments, and most personal computers now have two serial ports.

 

· Serial data can be transmitted two ways,

  1. synchronous - all of the data bits are timed between sender and receiver.
  2. asynchronous - the data bits arrive unannounced, without any coordination between sender and receiver. (this is the most common)
    1. RS-232/RS-232C - the most common standard using voltage levels
    2. RS-422a/423a/449 - a current loop standard well suited to noisy conditions
    3. RS-485 - allows multiple talkers and listeners on one serial line (this can be the basis for a network)

 

· A typical data byte looks like the one below. The voltage/current on the line is turned on/off. The width of the bits determines the possible bits per second (bps). The value shown before is used to transmit a single byte.

 

 

· The bits shown correspond to,

  1. before - this is a period where no bit is being sent and the line is high
  2. start - a single bit to help get the systems synchronized
  3. data - this byte could be 7 or 8 bits, but is almost always 8 now. The value shown here is 01001000 binary.
  4. parity - this lets us check to see if the byte was sent properly. The most common choices here are no parity bit (just drop it out), or even parity, or odd parity. In this case there are two bits set. If we are using even parity the bit would be set. If we are using odd parity the bit would be off
  5. stop - the stop bits allow form a natural pause at the end of the data.
  6. after - a period of time where the line is high before the next byte.

 

· Typical electrical connections look like,

 

 

 

31.4.1 RS-232

31.4.2 ASCII (American Standard Code for Information Interchange)