nanda16universal
Title of the paper: Universal Asynchronous Receiver and Transmitter (UART)
Available at: https://ieeexplore.ieee.org/document/7586376
Abstract
Almost all computers and microcontrollers have several serial data ports used to communicate with serial input/output devices such as keyboards and serial printers. By using a modem connected to a serial port serial data can be transmitted to and received from a remote location via telephone line. The serial communication interface, which receives and transmits the serial data is called a UART (Universal
Asynchronous Receiver-Transmitter). RxD is the received serial data signal and TxD is transmitted data signal. In this project UART is implemented in virtex II pro FPGA chip due to low cost, high speed, reprogram ability and fast time to market.
Introduction
UART is an integrated circuit which is programmed to control a computer's interface to its attached serial devices. Specifically, it provides the system with the RS-232C Data Terminal Equipment (DTE) interface, enabling it to talk to and exchange data with modems and some other serial devices.
Being a part of this interface, the UART also provides the basic operations as:
Converts the bytes it gets from the computer along parallel circuits to a single serial bit stream for outbound transmission.
For inbound transmission, converts the serial bit stream to the bytes that the system handles.
Adds a parity bit after selection in outbound transmissions, checks the parity of incoming bytes (if
selected) and rejects the parity bit.Adds start and stop delineators for outbound and helps to strip them from inbound transmissions.
Handles interrupts from keyboard and mouse (which are serial devices with special ports).
UART Design
The UART block diagram consists of three main components:
Transmitter control,
Receiver control and
Baud rate generator.
When transmitting , the UART takes eight bits of parallel data, converts the data to a serial bit stream that has a start bit (logic ‘0’), 8 data bits, and a stop bit (logic ‘1’).
When receiving, the UART initially detects a start bit, then receives a stream of 8 data bits and translates the data into parallel when it detects the stop bit.
As no clock is transmitted, the UART must synchronize incoming stream of bits with the local clock.
The following six 8bit registers are used.
1- RSR- Receive shift register
2- RDR- Receive data register
3- TDR- Transmit data register
4- TSR- Transmit shift register
5- SCCR- Serial communications control register
6- SCSR- Serial communications status register
Baudrate Generator
UART Transmitter
When the microcontroller is ready to transmit data, the following occurs.
The microcontroller waits until TDRE=’1’ (transmit data register empty bit) and then loads a byte of data into TDR clears TDRE.
UART transfers data from TDR to TSR and sets TDRE.
The UART provides an output as a start bit ‘0’ for one bit time and then shifts TSR right to transmit the eight data bits followed by the stop bit ‘1’.
In this step the UART transfers data from TDR to TSR and sets TDRE.
The UART gives a output as a start bit ‘0’ for one bit time and shifts TSR right to transmit the eight data bits followed by the stop bit ‘1’.
UART Receiver
When UART detects a start bit, it reads the left over bits serially and shifts them into RSR.
When all the data bits and the stop bit are received, the RSR loads into RDR and the flag of Receive Data Register Full (RDRF) in the SCSR is set.
The microcontroller checks for the RDRF flag, and if it is set, the flag is cleared by reading RDR.
RxD is sampled eight times during each bit time. It is sampled on the rising edge of the BClkX8. The bit is read in middle of each bit time for maximum reliability. When RxD first goes low, we will wait for four BClkX8 periods, which should take us closer to the middle of the first data bit. Then reading once per eight BClkX8 clocks is continued until we have read the stop bit.
Additional Information
RS232 COM ports are normally configured as either a DTE (Data Terminal Equipment) port or a DCE (Data Communications Equipment) port. The COM port on a personal computer is a DTE port (male). The COM port on Digi radio modems are configured as DCE port (female).