<CS> Learning

Data Transmission Camera Lab

Send bits by screen or by arm: serial and parallel, baud rate and bit rate, and clocks

Link settings

Sender and receiver must agree all of these before anything is sent.

Sender

Transmit

Sender clock: stopped

What will be sent

Symbols on the line (one per signal change)

Channel impairments

Receiver

Receive and decode

Listening

    Video is processed in this browser only. Nothing is recorded or uploaded.

    Signal arriving at the receiver, after the channel. Dashed lines mark the levels it must tell apart (for 1 bit, the HIGH/LOW threshold).

    Signal trace

    Decoded message

    Received symbols

    #Time (s)Sampled asLevel(s)BitsCheck
    01Serial and parallel transmission

    Serial transmission sends bits one after another along a single line. Parallel transmission sends several bits at the same time, one on each of several lines.

    Over short distances, parallel can move more bits per signal change. Over longer distances it suffers from:

    • Skew: bits sent together on different lines arrive at slightly different times, so the receiver may sample a line before its new value arrives.
    • Crosstalk: the signal on one line interferes with the lines next to it.

    Serial avoids both problems and is cheaper to cable, so long-distance and modern high-speed links are usually serial. To see this, set parallel lines, then add skew or crosstalk under Channel impairments. Skew is a fixed delay, so it does more damage at higher baud rates.

    02Baud rate and bit rate

    The baud rate is the number of signal changes (symbols) per second. The bit rate is the number of bits sent per second.

    bit rate = baud rate × bits per signal

    Sending n bits per signal needs 2n distinguishable levels. With 4 levels (2 bits) at 5 baud, the bit rate is 10 bits per second. Parallel lines multiply the total again.

    More levels packed into the same range are closer together, so noise causes more errors. Try 3 bits per signal with some noise.

    Start bits, stop bits, parity bits and the clock line are all overheads. That is why the useful data rate is lower than the bit rate.

    03Bandwidth and bit rate

    Bandwidth is the range of signal frequencies a channel can carry. A channel with a higher bandwidth lets the signal change level more quickly.

    The bit rate is directly proportional to the bandwidth. Try a low bandwidth: at a low baud rate each level still settles before it is sampled. Raise the baud rate and the levels smear into each other until the receiver misreads them.

    People have a very low bandwidth: you cannot move your arms many times a second. That is why the humans mode only offers slow baud rates.

    04Synchronous and asynchronous

    In synchronous transmission, data is sent at regular intervals timed by a clock signal shared by sender and receiver. Here that is the amber clock line. The data changes when the clock falls and is read when the clock rises. Synchronous transmission can be serial or parallel.

    In asynchronous serial transmission there is no shared clock. Each end has its own clock, set to the agreed baud rate. Each frame is wrapped in:

    • a start bit (here HIGH). Its edge starts the receiver's clock, so the clocks are synchronised for this frame.
    • a stop bit (here LOW). It must be the opposite of the start bit so the line always returns to idle and the next start bit is a detectable change. It can last any length of time.

    In the trace, the receiver's clock ticks in the middle of each bit, counted from the start-bit edge.

    05ASCII and parity

    Each character is sent as its 7-bit ASCII code plus one parity bit, which gives 8 bits.

    With even parity, the parity bit is set so that the total number of 1s, including the parity bit, is even. With odd parity, the total is odd.

    The receiver counts the 1s again. A mismatch shows an error. Parity detects any odd number of flipped bits, but it cannot detect two flipped bits, and it cannot tell which bit is wrong.

    The parity bit can sit in the most or least significant position, and the bits can be sent MSB first or LSB first. Both ends must agree which.

    06Setting up the cameras
    • Device → device: open this page on two computers. Choose Sender on one and Receiver on the other, and type the sender's settings code into the receiver.
    • Make the sender's signal full screen and point the receiver's camera at it, filling as much of the picture as you can. Turn the sender's screen brightness up and avoid reflections.
    • While the sender shows the flashing lock-on pattern, press Lock on. Keep both computers still afterwards.
    • A 30 frames per second camera needs about 3 frames per symbol, so about 10 baud is the useful limit.
    • Humans: stand side by side about 2–3 m from the camera, facing it, with your hips and heads in view. Hold a forearm level across your body: at your hips for the lowest level, at your shoulders for the highest.
    • Photosensitivity: the signal never flashes more than 3 times a second unless you accept a warning first. That happens with a synchronous clock above 3 baud, data above 6 baud, or noise switched on. Check that nobody watching has photosensitive epilepsy before you accept.
    • Humans mode loads a pose-detection model (about 6 MB) the first time. Video is still processed only in this browser.