Universal Asynchronous Receiver Transmitter (UART)
Universal Asynchronous Receiver Transmitter (UART)
Universal Asynchronous Receiver Transmitter (UART)
T.REVATHI
TIFAC CORE IN AUTOMOTIVE INFOTRONICS
VIT UNIVERSITY, VELLORE
Contents
Basic Concepts of Serial communication
Types
Advantages
Applications
UART Features in ARM
Serial Communication
Serial Communication Data Bits will be sent in a serial
Terms to be remembered
Baud Rate No. of bits transmitted over the serial link per
transmission speed in
Asynchronous communication)
Half-duplex
Communication
channel
where
both
direction at a time
Full-duplex - Connection permits the sending and receiving
bit called the "Start Bit" is added to the beginning of each word that is
to be transmitted.
by the time the signal reaches the receiver, its voltage may have attenuated
by the cable impedance or have noise riding on it.
In order to avoid and decrease the noise margin, the signal from the
interpreted as a logic 1.
A voltage more positive than +3 V at the receiver input is
interpreted as a logic 0.
Types of Connectors
Typical Connection
Applications
Dial-up modems
GPS receivers
Printers
Satellite Phones
Computer terminal
Serial mouse
RS 485 Specifications
RS485 is a balanced line, Half-duplex transmission system allowing
RS-485 Signaling
For Input
If a logic high is received on the
For Output
If Line A is more positive than line
VOA).
control signal.
Differential system provides noise immunity,
Half-duplex RS-485 links have multiple drivers and receivers on the same signal path.
This is the reason why RS-485 transceivers must have driver/receiver enable pins enabling only
one driver to send data at a time.
Advantages of RS-485
Long distance linksup to 4000 feet.
cables.
Differential transmission increases noise immunity and decreases noise
emissions.
Multiple drivers and receivers can be connected on the same bus.
Wide common-mode range allows for differences in ground potential
Applications of RS-485
Motor Control
Industrial Automation
Battery powered applications
Tele-communications equipment
Industrial Process Control
Features in LM4F120H5QR
UART in LM4F120H5QR
Programmable baud-rate generator allowing speeds up to 5 Mbps for regular speed (divide by
16) and 10 Mbps for high speed (divide by 8)
Separate 16x8 transmit (TX) and receive (RX) FIFOs to reduce CPU interrupt service loading
Programmable FIFO length, including 1-byte deep operation providing conventional
double-buffered interface
FIFO trigger levels of 1/8, 1/4, 1/2, 3/4, and 7/8
Standard asynchronous communication bits for start, stop, and parity
Line-break generation and detection
Fully programmable serial interface characteristics
5, 6, 7, or 8 data bits
Even, odd, stick, or no-parity bit generation/detection
1 or 2 stop bit generation
Block Diagram
SysCtlClockSet
Prototype:
Parameters:
Description:
This function configures the clocking of the device. The input crystal
frequency, oscillator to be used, use of the PLL, and the system clock
SysCtlPeripheralEnable
Enables a peripheral.
Prototype:
Parameters:
Description:
GPIOPinTypeUART
Step 4: Select the UART
Prototype:
Parameters:
corresponds to the
peripheral function
Description:
The UART pins must be properly configured for the UART peripheral to function correctly. This
function provides a typical configuration for those pin(s);
The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be
accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1,
and so on.
This function cannot be used to turn any pin into a UART pin; it only configures a UART pin for proper
operation.
UARTConfigSetExpClk
Prototype:
Parameters:
Prototype:
Parameters:
Transmitter
Description:
This function sends the character ucData to the transmit FIFO for
the specified port. If there is no space available in the transmit FIFO,
Prototype:
Receiver
Parameters:
Description:
This function gets a character from the receive FIFO for the specified
port. If there are no characters available, this function waits until a