Technical Note TN_111. What is a UART?

Similar documents
Application Note AN_149. Upgrading a passive DB9 RS232 Interface to an active USB Interface using an FTDI DB9-USB-RS232 Module

Application Note. AN_136_Hi-Speed Mini Module EEPROM Disaster Recovery

Application Note AN_243. FT312D USB Host to UART Cable Application

Future Technology Devices International Ltd. USB NMC-2.5m. USB to USB Null Modem Cable. Datasheet

Application Note AN_241. FTDI_AOA_HyperTerm_User_Manual

TTL-232R-PCB. TTL to USB Serial Converter PCB. Datasheet

Application Note AN_242

Future Technology Devices International Ltd

Determining USB Peripheral Device Class

Future Technology Devices International Ltd. USB-Key. Datasheet

Future Technology Devices International Ltd. USB to RS232 UART Serial Converter PCB. Datasheet

Command Processor for MPSSE and MCU Host Bus Emulation Modes

Application Note AN_385. FTDI D3XX Driver Installation Guide

Future Technology Devices International Ltd. AN232R-02 FTDIChip-ID for the FT232R and FT245R

Simplified Description of USB Device Enumeration

Technical Note. TN_134 FTDI Android D2XX Driver

Technical Note TN_152. USB 3.0 Compatibility Issues Explained

Future Technology Devices International Ltd USB TO RS422 UART SERIAL CONVERTER PCB. Datasheet. Document Reference No.: FT_000119

FT2232H Mini Module. USB Hi-Speed FT2232H Evaluation Module. Datasheet

VDIP1. Vinculum VNC1L Module. Datasheet

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows 7

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

White Paper WP_001. Connecting Peripherals to an Android Platform

Future Technology Devices International Ltd

Future Technology Devices International Ltd. Application Note AN_234. FTDI Drivers Installation guide for. Windows 8

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows VISTA

C232HD. USB 2.0 Hi-Speed to UART Cable. Datasheet

VF2F. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit. Future Technology Devices International Ltd. Preliminary - Subject to Change

Future Technology Devices International Ltd. USB to RS232 Serial Converter Range of Cables. Datasheet

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

Application Note AN_185. Vinculum-II UART to USB HID Class Host Bridge

DB9-USB-RS232 Module. Male & Female. Datasheet

Technical Note. TN_132 Adding FTDI Devices VCP Driver Support to Android

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

TTL-232R-3V3 USB to TTL Serial Converter Cable

USB-COM422-PLUS1. Datasheet

Technical Note TN_158. What is the Camera Parallel Interface?

Application Note AN_101. Submitting Modified FTDI Drivers for Windows Hardware Certification

UMFT4222PROG FT4222 Programmer Module

USB-COM422-PLUS2. Datasheet

USB-COM232-PLUS4. Datasheet

The DB9-USB Family of. UART Converter Modules. Datasheet

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

Future Technology Devices International Ltd. Windows XP Installation Guide

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

USB Hi-Speed Serial/Hub Module. Datasheet

Future Technology Devices International Ltd. VF2F2. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit.

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

Technical Note. TN_147 Java D2xx for Android

Future Technology Devices International Ltd. Technical Note TN_101

Application Note AN_276. FT800 Audio File Conversion

White Paper WP_003. Android Peripheral Options

C232HM. USB 2.0 Hi-Speed to MPSSE Cable. Datasheet

Future Technology Devices International Ltd. Windows 2000 Installation Guide

FTDI Chip. VM800P Datasheet Embedded Video Engine Plus Module. VM800P Embedded Video Engine Plus Module Datasheet Version 1.0

Technical Note TN_146. Creating Android Images for Application Development

FTDI Ltd DS_US232R-10(R-100/500) USB to RS232 Adapter cable. Data Sheet

Application Note AN_208. FT311D and FT312D Demo_APK_User_GuideFT311D and FT312D Demo_APK_User_Guide

Future Technology Devices International Ltd

Vinco Development Module. Datasheet

Technical Note TN_105

Future Technology Devices International Ltd. MM232R USB - Serial UART Development Module. Datasheet

Application Note AN_146. USB Hardware Design Guidelines for FTDI ICs

Application Note AN_100. Using the FT232R/FT245R with an External Crystal or Oscillator

The Secrets of Flow Control in Serial Communication

Application Note AN_254. FT800 Designs With Visual TFT

RS-232 COMMUNICATIONS

UC232R ChiPi Minimum Component FT232RL USB to RS232 Converter Cable

Using Xbee in Serial Communication

RJ45 Shielded (standard) port pinout. CS9000, Jetstream , Lanstream 2000, RTA8/RJX, RRC16, MTA8/RJX & SXDC8/RJX

PCMCIA 1 Port RS EDITION OCTOBER 1999

Manual Serial PCI Cards

Advanced Data Capture and Control Systems

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

USB / Data-Acquisition Module NOW LEAD-FREE

USB TO SERIAL ADAPTER

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Future Technology Devices International Ltd. FT311D

Application Note 83 Fundamentals of RS 232 Serial Communications

Cable Guide. Click on the subject to view the information. Digi Cables Building Cables General Cable Information

Application Note AN_250. Configuring FT313H Driver for Embedded Linux

NOW LEAD-FREE! VCCIO VCCIO RXLED TXLED DTR# 10K FTDI FT232R

DK40 Datasheet & Hardware manual Version 2

Future Technology Devices International Ltd. UM232R USB - Serial UART Development Module. Datasheet

Quectel Cellular Engine

Cable Specifications and Information

ELAN DIGITAL SYSTEMS LTD. SL232 PC- CARD USER S GUIDE

a8251 Features General Description Programmable Communications Interface

Serial Communications

1.1 Connection Direct COM port connection. 1. Half duplex RS232 spy cable without handshaking

SEC 4100 SYSTEM MONITOR Programmable Serial Interface Card Series 2

Application Note AN_113. Interfacing FT2232H Hi-Speed Devices To I2C Bus

UART IP Core Specification. Author: Jacob Gorban

isco Connecting Routers Back to Back Through the AUX P

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

Using HyperTerminal with Agilent General Purpose Instruments

1 Port FTDI USB to RS232 Null Modem Adapter

Single channel data transceiver module WIZ2-434

Future Technology Devices International Ltd. UM245R USB - Parallel FIFO. Development Module. Datasheet

Transcription:

Future Technology Devices International Ltd. Technical Note TN_111 What is a UART? Document Reference No.: DocNo FT_000157 Version 1.0 Issue Date: 2009-08-07 The purpose of this technical note is to clarify the differences in the terms UART, Serial port, RS232, RS422 and RS485. Future Technology Devices International Limited (FTDI) Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow G41 1HH, United Kingdom Tel.: +44 (0) 141 429 2777 Fax: + 44 (0) 141 429 2758 E-Mail (Support): Support1.support@ftdichip.com Web: http://www.ftdichip.com Copyright 2009 Future Technology Devices International Limited

Table of Contents Document Reference No.: DocNo FT_000157 1 Introduction... 2 2 The UART... 3 2.1 Signals... 3 2.1.1 RXD... 3 2.1.2 TXD... 3 2.1.3 RTS#... 3 2.1.4 CTS#... 3 2.1.5 DTR#... 3 2.1.6 DSR#... 3 2.1.7 DCD#... 3 2.2 Data Format... 3 2.2.1 Number of Start Bits... 4 2.2.2 Number of Data Bits... 4 2.2.3 Parity... 4 2.2.4 Number of Stop Bits... 4 2.3 Flow control... 4 2.3.1 NONE... 4 2.3.2 HARDWARE... 4 2.3.3 SOFTWARE... 4 2.4 Baud rate... 4 2.5 Local Echo... 4 2.6 Typical interconnect... 5 3 RS232... 6 4 RS422... 7 5 RS485... 8 6 Comparison Table... 9 7 What FTDI offer... 10 8 Contact Information... 11 Appendix A - References... 13 Appendix B - Revision History... 14 Revision Record Sheet... 15 Copyright 2009 Future Technology Devices International Limited 1

1 Introduction Many users are confused by the interchangeable names used for a serial port. This is partly due to slang language and poor definitions. The purpose of this technical note is to clarify what the differences between a UART, RS232, RS422 or RS485 port are. Copyright 2009 Future Technology Devices International Limited 2

2 The UART The term UART means Universal Asynchronous Receiver Transmitter and is a commonly used interface to transfer serial data. Being asynchronous there is no clock signal but the structure of the transmitted data provides for a start and an end to a message. It is also important that both ends of the link decide to operate with the same pulse width defined as the baud rate. The UART of a micro-controller will normally operate at 3V3 or 5V TTL levels. The UART will only connect to one other device in the chain. 2.1 Signals The following signals are used to create a UART interface however not every design needs to use every signal. A # symbol is used to designate an active low signal ie active at logic 0. 2.1.1 RXD The RXD signal of a UART is the signal receiving the data. This will be an input and is usually connected to the TXD line of the downstream device. 2.1.2 TXD The TXD signal of a UART is the signal transmitting the data. This will be an output and is usually connected to the RXD line of the downstream device. 2.1.3 RTS# The RTS# (Ready to Send) signal of a UART is used to indicate to the downstream device that the device is ready to receive data. This will be an output and is usually connected to the CTS# line of the downstream device. 2.1.4 CTS# The CTS# (Clear to Send) signal of a UART is used by the downstream device to identify that it is OK to transmit data to the upstream device. This will be an input and is usually connected to the RTS# line of the upstream device. 2.1.5 DTR# The DTR# (Data Terminal Ready) signal of a UART is often used for flow control in modems, but many serial interfaces do not use this signal. It is used to signal that the modem is ready to connect. 2.1.6 DSR# The DSR# (Data Set Ready#) signal of a UART interface is mostly seen in modem applications otherwise the pin is frequently unused. 2.1.7 DCD# The DCD# (Device Carrier Detect) signal of a UART interface is mostly seen in modem applications otherwise the pin is frequently unused. It is used to indicate a connection is established. 2.2 Data Format The format of the data is basically made up of start data parity stop, however the number of bits in each section may vary. The data is sent with the least significant bit (LSB) first. Figure 1: 1 start bit, 8 data bits, 1 parity bit and a stop bit. Copyright 2009 Future Technology Devices International Limited 3

2.2.1 Number of Start Bits There is always only ever 1 start bit. 2.2.2 Number of Data Bits The number of data bits usually varies between 5, 6, 7, 8 or 9 bits. 8 data bits is most common. 2.2.3 Parity Parity has many settings, NONE, EVEN, ODD, MARK and SPACE. 2.2.4 Number of Stop Bits The number of stop bits usually varies between 1, 1.5 and 2. 2.3 Flow control Flow control is used to control the flow of data and prevent buffer overrun if a device cannot accept more data. It is also sometimes termed as handshaking. There are 3 main settings for flow control as described in the following sections. 2.3.1 NONE This setting does not use flow control at all and relies on the application or device to be able to move data fast enough to prevent overrun. 2.3.2 HARDWARE This setting uses the RTS# and CTS# lines. The RTS# line of one device (A) drives the CTS# line of the other device (B) and vice versa. If the RTS# line of device (A) is active it is stating the device (A) is able to accept more data by driving the CTS# input of the device (B) at the other end of the link active. Otherwise device (B) should stop transmitting. 2.3.3 SOFTWARE This setting uses special characters to start and stop data flow. These are termed XON and XOFF. The XON character tells the downstream device to start send data. The XOFF character tells the downstream device to stop sending data. Usually it is possible to define these characters in an application. Typical defaults for XON is 0x11 and for XOFF is 0x13. 2.4 Baud rate The baud rate is a measure of how fast the transmission will occur. A typical baud rate may be 9600 baud. In terms of bits per second of data this is equal to 9600 / 10 = 960 bits per second. The value of 10 in the divisor assumes 1 start bit + 8 data bits + no parity + 1 stop bit. In terms of a pulse width each bit is 1 / 9600 = 104 usec wide. 2.5 Local Echo Local echo is the term used when data transmitted is also echoed back to the transmitting device. It is mostly used in RS485 systems but can be a useful debug technique also to determine if data is being transferred. Copyright 2009 Future Technology Devices International Limited 4

2.6 Typical interconnect FIGURE 2: RXD and TXD lines are always used to transfer data, the other lines support flow control and are optional. There are also many different combinations of flow control used for example RTS# and CTS# could be connected together on the same device to bypass flow control. You should refer to the manual supplied with your equipment to determine the correct cabling. Copyright 2009 Future Technology Devices International Limited 5

3 RS232 RS232 is effectively the same as the basic TTL level UART of section 2, but an additional line driver IC is added to increase the signal strength. It is still a full duplex single ended system meaning it uses a single wire for RX and a single wire for TX. A typical RS232 signal could operate between +/- 5V to +/-15V. This allows the signal to travel along a cable up to 10m long. A typical FTDI product will have a signal swing approximately +/- 6V. An RS232 system will have 1 driver transmitting to 1 receiver. A typical application for an RS232 interface is modems. Figure 3: Example of connecting a UART to a Line driver for RS232. Copyright 2009 Future Technology Devices International Limited 6

4 RS422 RS422 or ANSI/TIA/EIA-422 designs use the same basic UART but with a different line driver IC. The line driver will convert the single ended UART signal into a differential signal. This gives four data lines, TXD+, TXD-, RXD+ and RXD-. The benefit of using a differential signal as opposed to a single ended signal is that the system has better immunity to noise allowing for longer cable lengths. The signals drive between +/- 2.0V. Figure 4: Typical RS422 interconnect. RS422 systems can have 1 device transmitting at a time with 10 devices receiving in a system. RS422 systems are often used in industrial controllers. Copyright 2009 Future Technology Devices International Limited 7

5 RS485 RS485 or ANSI/TIA/EIA-485 designs use the same basic UART but with a different line driver IC. The line driver will convert the single ended UART signal into a bi-directional differential signal. This gives two data lines, Data A and Data B. The benefit of using a differential signal as opposed to a single ended signal is that the system has better immunity to noise allowing for longer cable lengths. The signals drive between +/- 1.5V. Figure 5: Typical RS485 interconnect. RS485 systems can have 32 devices transmitting in a system with 32 devices receiving. RS485 systems are often used in CCTV applications to control the Pan, Tilt and Zoom functions. Copyright 2009 Future Technology Devices International Limited 8

6 Comparison Table The table below gives a quick guide to the differences between the main serial port configurations. TTL UART RS232 RS422 RS485 Signal Swing 0v to 3V3/5V +/-5V to +/-15V +/-2V +/-1.5V Termination Single ended Single Ended Differential Differential Transmission length ~2m ~15m ~1200m ~1200m No of transmitters/receivers on a line 1 Driver 1 Receiver 1 Driver 1 Receiver 1 Driver 10 Receiver 32 Driver 32 Receiver Copyright 2009 Future Technology Devices International Limited 9

7 What FTDI offer FTDI chipset FT232BL, FT232R, FT2232D, FT2232H and FT4232H can offer a USB conversion to a UART interface. The level of the UART is either 3V3 or 5V depending on the device configuration. The FT2232D, FT2232H and FT4232H can offer multiple UART channels in one chip package, each channel being independently controlled by the royalty free drivers supplied by FTDI. By adding different line drivers to the FTDI chipset UART interface they can also offer USB to RS232, USB to RS422 or USB to RS485 solutions. Copyright 2009 Future Technology Devices International Limited 10

8 Contact Information Head Office Glasgow, UK Future Technology Devices International Limited Unit 1, 2 Seaward Place, Centurion Business Park Glasgow G41 1HH United Kingdom Tel: +44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 E-mail (Sales) sales1@ftdichip.com E-mail (Support) support1@ftdichip.com E-mail (General Enquiries) admin1@ftdichip.com Web Site URL http://www.ftdichip.com Web Shop URL http://www.ftdichip.com Branch Office Taipei, Taiwan Future Technology Devices International Limited (Taiwan) 2F, No 516, Sec. 1 NeiHu Road Taipei 114 Taiwan, R.O.C. Tel: +886 (0) 2 8797 1330 Fax: +886 (0) 2 8751 9737 E-mail (Sales) tw.sales1@ftdichip.com E-mail (Support) tw.support1@ftdichip.com E-mail (General Enquiries) tw.admin1@ftdichip.com Web Site URL http://www.ftdichip.com Branch Office Hillsboro, Oregon, USA Future Technology Devices International Limited (USA) 7235 NW Evergreen Parkway, Suite 600 Hillsboro, OR 97123-5803 USA Tel: +1 (503) 547 0988 Fax: +1 (503) 547 0987 E-Mail (Sales) us.sales@ftdichip.com E-Mail (Support) us.admin@ftdichip.com Web Site URL http://www.ftdichip.com Branch Office Shanghai, China Future Technology Devices International Limited (China) Room 408, 317 Xianxia Road, ChangNing District, ShangHai, China Tel: +86 (21) 62351596 Fax: +86(21) 62351595 E-Mail (Sales): cn.sales@ftdichip.com E-Mail (Support): cn.support@ftdichip.com E-Mail (General Enquiries): cn.admin1@ftdichip.com Web Site URL: http://www.ftdichip.com Copyright 2009 Future Technology Devices International Limited 11

Distributor and Sales Representatives Please visit the Sales Network page of the FTDI Web site for the contact details of our distributor(s) and sales representative(s) in your country. Neither the whole nor any part of the information contained in, or the product described in this manual, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. This product and its documentation are supplied on an as-is basis and no warranty as to their suitability for any particular purpose is either made or implied. Future Technology Devices International Ltd will not accept any claim for damages howsoever arising as a result of use or failure of this product. Your statutory rights are not affected. This product or any variant of it is not intended for use in any medical appliance, device or system in which the failure of the product might reasonably be expected to result in personal injury. This document provides preliminary information that may be subject to change without notice. No freedom to use patents or other intellectual property rights is implied by the publication of this document. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow G41 1HH United Kingdom. Scotland Registered Number: SC136640 Copyright 2009 Future Technology Devices International Limited 12

Appendix A - References http://www.eia.org/ Electronics Industry Alliance (EIA) have defined the RS232, RS422 and RS485 standards. Copyright 2009 Future Technology Devices International Limited 13

Appendix B - Revision History Revision History Draft Initial Draft June, 2009 V1.0 First Release 7 th August, 2009 Copyright 2009 Future Technology Devices International Limited 14