Data Communications 101

Course time: 1 hour
Prerequisite: Electricity 101

Bits and bytes

A 'bit' of data is a single "binary digit" unit of information: a 1 or a 0. 8 bits make up what is now universally known as a "byte"; 256 possible values fit in a byte, and can represent anything including characters of an alphabet. One common data representation is "ASCII" which uses 7 of the 8 bits of a byte to represent numbers, letters of the English alphabet, and some punctuation marks as well as some special "control codes" such as "carriage return" and "line feed". The 8th bit (bit 7 as it is commonly referred to, since "bit zero" is the designation of the low-order bit) was once commonly used for a "parity check", but this use is much less common now that more reliable methods of error detection and correction are built into modern hardware and software.

RS232

There have been several revisions of the RS232 standard, and this short summary may not be exactly correct, but should be sufficiently accurate for purposes of this course. Serial communication occurs using a minimum of 3 wires; transmit, receive, and signal ground. The normal "idle" state of the line is referred to as "mark", or 1, and, when a character is about to be transmitted, the line drops to a 0, or "space", for the duration of one "bit time" (the time it takes to transmit one bit, at the specified bit rate, say 9600 bits per second); the bits of the byte are then transmitted, from bit 0 to bit 7; using a "space" for zero and a "mark" for 1; finally one or more "stop bits" are transmitted as 1 (mark). The stop bits are used to ensure that the line goes idle for at least one "bit time" before the start bit preceding the next character, giving the electronic devices a chance to reset. Now, to add to the confusion, the signal is inverted as it is being sent over the wire; that is, a "1", which is normally +5 VDC in a TTL circuit, becomes a negative voltage as it leaves the RS232 hardware, somewhere between -3 and -25 VDC. A zero becomes a positive voltage between +3 and +25 VDC. This will all become clear when we use the oscilloscope to observe a serial transmission.

10baseT

The next form of data communications we will explore will be twisted-pair ethernet, at its "old, slow" speed of 10 megabits per second, known as 10BaseT. This form of data transmission sends multibyte "packets" of data with much less overhead than RS232, since instead of "start" and "stop" bits surrounding each character, there are "framing" bits prepended to each packet, and the data bytes follow one another with no "spaces" in between. A special "checksum" follows each packet (actually a CRC, "cyclical redundancy check") which is used by the ethernet hardware to make sure the packet was received correctly. We won't get into the details of this, since most older oscilloscopes won't be able to show the signal to enough resolution for you to be able to verify what we're saying; instead we will simply focus on what happens when various sized packets are transmitted, with various MTU (maximum transmission unit) settings. We will also, during the process, note the overhead imposed by various lower-level network protocols such as UDP and IP.

Using oscilloscope

We now go to the lab to measure bit rate of serial transmission, and to observe the MTU of network packets. A specially-made extender will be clipped to the end of the cable being used, with various wires left bare for the oscilloscope probes, so we can observe the waveforms of the data transmissions and, using the time scale of the scope, calculate the data rate and/or the packet sizes. This method can be used to determine the speed of unknown hardware, and even the software settings (7 or 8 bits, parity, number of stop bits, etc). With ethernet (10BaseT) it can be used to observe the MTU and determine the size of the packet headers, using the "ping" utility with various sizes of data packets. For this we will need to set up a point-to-point (crossover) cable to make a "private" network, otherwise we will not be able to see our specially-crafted packets among the "noise" of an active network.
The current date is
This page was last modified
Author jcomeau@risp.org, otherwise known as:
John Comeau
P. O. Box 100632
Ft. Lauderdale, FL 33310-0632
Home page and GPG key