Informacion

Páginas: 10 (2490 palabras) Publicado: 29 de junio de 2011
Maxim/Dallas > App Notes > INTERFACE CIRCUITS

UARTs

Keywords: clock accuracy, UART communications, crystal resonator, crystal oscillator, ceramic resonator, econo-oscillator, econoscillator, UARTs, RS232, RS-232, RS485, RS-485

Jun 30, 2003

APPLICATION NOTE 2141

Determining Clock Accuracy Requirements for UART Communications
This application note discusses the timing requirementsfor the commonly used serial asynchronous communications protocol implemented in UARTs, and shows how to determine the tolerance for the UART clock source at both ends of an asynchronous link.

Background
The RS-232 specification dates back to 1962, when it was first released by the EIA (Electronic Industries Association). The specification has changed over time, incorporating higher data ratesand closing the compatibility gaps between TIA (Telecommunication Industry Association) and international (ITU, ISO) standards. The current version of the RS-232 specification is EIA/TIA-232-F, dated October 1997. The protocol benefited from the availability of MSI ICs from the late 1970s which had the complexity to handle the standard at reasonable cost. These ICs are generically called UARTs(Universal Asynchronous Receive Transmit). Many LSI ICs (including microcontrollers) now include the functionality. As is often the case, the availability of UARTs drove the industry to use the RS-232 serial protocol in non-RS-232 ways. Common examples are RS-485 transmissions, opto-isolated transmissions, and transmissions using a single-ended physical layer (i.e. 0 - 3.3V instead of ±5V or ±10V).This note covers the general timing aspects of the serial interface, not application nuances of handshaking or the physical layer, and so is applicable to all generalized UART applications.

UART Timing
A typical UART frame is shown in Figure 1. It comprises a Start bit, 8 data bits, and a Stop bit. Other variants are also possible in RS-232 applications - the data packet could be 5, 6, or 7bits long, there could be 2 Stop bits, and a Parity bit could be inserted between the data packet and the Stop bit for rudimentary error detection. Figure 1 shows the signaling as seen at a UART's TXD (Transmit Data) or RXD (Receive Data) pins. RS-232 bus drivers invert as well as level shift, so a logic 1 is a negative voltage on the bus, and a logic 0 is a positive voltage.

Figure 1. A typicalUART data frame. When two UARTs communicate, it is a given that both transmitter and receiver know the signaling speed. The

receiver doesn't know when a packet will be sent, with respect to the receiver clock, hence the protocol is termed asynchronous. The receiver circuitry is correspondingly more complex than that of the transmitter. While the transmitter simply has to shuffle out a frame ofdata at a defined bit rate, the receiver has to recognize the start of the frame to synchronize itself, and therefore determine the best data sampling point for the bitstream. Figure 2 shows a common method used by UART receivers to synchronize to a received frame. The receive UART uses a clock which is 16 times the data rate. A new frame is recognized by the falling edge at the beginning of theactive-low Start bit, when the signal changes from the active-high Stop bit or bus idle condition. The receive UART resets its counters on this falling edge, and expects mid Start bit to occur after 8 clock cycles, and the mid point of each subsequent bit to appear every 16 clock cycles thereafter. The Start bit is typically sampled at the mid bit time to check that the level is still low, toensure that the detected falling edge was a Start bit not a noise spike. Another common improvement is to sample each bit not simply once at the mid bit position (clock count 8 out of 16), but three times (clock counts 7, 8, and 9 out of 16).

Figure 2. UART receive frame synchronization and data sampling points.

Timing Accuracy
So the question is: how accurate does the receive UART clock have...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Informacion
  • Informacion
  • Informacion
  • Informacion
  • Informacion
  • Informacion
  • Informacion
  • Informacion

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS