You are on page 1of 12

UART Overview

Transmitting and Receiving Serial


Data

BYU ECEn 320

The ABCs of Serial Ports

UART = Universal Asynchronous Receiver/Transmitter


TX = Transmitter
RX = Receiver
TD = Transmit Data (Data output)
RD = Receive Data (Data input)
RTS = Request to Send (Flow control output)
CTS = Clear to Send (Flow control input)
Half Duplex transmits one direction at a time (mostly obsolete
now)
Full Duplex transmits both directions at the same time
RTS/CTS Flow control for full duplex serial ports :
RX assert RTS when it is ready to receive
TX waits for CTS before transmitting

BYU ECEn 320

Serial Port Devices


The following is a list of various hardware
components that use Serial Ports :
Mouse - One of the most commonly used devices for
serial ports.
Modem - Used commonly with older computers.
Network - One of the original uses of the serial port,
which allowed two computers to connect together
and transfer large files between the two.
Printer - Mostly used with older printers only.
ASCII Terminal (TTY) - Like the Hyperterm interface.

BYU ECEn 320

Hooking Up Two Serial Ports


Full Duplex
TD

TD

RD

RD

RTS

RTS

CTS

CTS

GND

GND

BYU ECEn 320

Hooking Up Two Serial Ports


Full Duplex
TD

TD

RD

RD

RTS

Cable

RTS

CTS

CTS

GND

GND

BYU ECEn 320

Serial Port
on
Spartan 3 Board
DCD
DSR
RXD
RTS
TXD
CTS
DTR
RI

BYU ECEn 320

Connection
to PC

BYU ECEn 320

Serial Communication Format


Data is transmitted sequentially, one bit at a time.
To inform the receiver that a new byte is arriving, a start bit
(a zero) is sent first. A start bit can start at any time.
Then the data is transmitted, LSB (least significant bit) first,
and MSB (most significant bit) last.
At the end, zero, one or two stop bits (ones) are transmitted.
A frame consist of :

1 start bit (a zero)


7 or 8 data bits LSB (least significant bit) first
1 optional parity bit
0, 1 or 2 stop bits (ones)

Between transmissions, the transmitter transmits a high.


The bit time is determined by the baud rate which is given in
units of BPS (bits per second).
Transmitter and receiver do not share a clock (hence the
asynchronous nature).

BYU ECEn 320

Serial Frame

http://www.atmel.com/dyn/resources/prod_documents/DOC0941.PDF

http://www.wcscnet.com/Tutorials/SerialComm/Page1.htm
BYU ECEn 320

Transmitting

BYU ECEn 320

Receiving

1.5 bit
time

1.5 bit
time

BYU ECEn 320

Receiver Sample Timing


Slightly Faster Baud
Rate

Exact Baud Rate

Slightly Slower Baud


Rate

1.5
Bit
Time

1
Bit
Tim
e

BYU ECEn 320

You might also like