12
BYU ECEn 320 UART Overview Transmitting and Receiving Serial Data

UART Overview

  • Upload
    tulia

  • View
    56

  • Download
    2

Embed Size (px)

DESCRIPTION

UART Overview. Transmitting and Receiving Serial Data. The ABC’s 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) - PowerPoint PPT Presentation

Citation preview

Page 1: UART Overview

BYU ECEn 320

UART Overview

Transmitting and Receiving Serial Data

Page 2: UART Overview

BYU ECEn 320

The ABC’s 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

Page 3: UART Overview

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.

Page 4: UART Overview

BYU ECEn 320

Hooking Up Two Serial Ports

TD

RD

RTS

CTS

GND

TD

RD

RTS

CTS

GND

Full Duplex

Page 5: UART Overview

BYU ECEn 320

Hooking Up Two Serial Ports

TD

RD

RTS

CTS

GND

TD

RD

RTS

CTS

GND

Full Duplex

Cable

Page 6: UART Overview

BYU ECEn 320

RTS

CTS

RXD

TXD

DTR

DSRDCD

RI

Serial Porton

Spartan 3 Board

Page 7: UART Overview

BYU ECEn 320

Connectionto PC

Page 8: UART Overview

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).

Page 9: UART Overview

BYU ECEn 320

Serial Frame

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

http://www.wcscnet.com/Tutorials/SerialComm/Page1.htm

Page 10: UART Overview

BYU ECEn 320

Transmitting

Page 11: UART Overview

BYU ECEn 320

Receiving

1.5 bit time

1.5 bit time

Page 12: UART Overview

BYU ECEn 320

Receiver Sample Timing

1.5Bit

Time

1BitTi

me

Exact Baud Rate

Slightly Slower Baud Rate

Slightly Faster Baud Rate