EasyManua.ls Logo

Freescale Semiconductor MPC5604B - 5. Using the UART Driver for a terminal interface

Default Icon
150 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
82
Chapter 10
UART: Universal Asynchronous Receiver
Transmitter
1.
Introduction to UART
Universal Asynchronous Receiver/Transmitter is a very common circuit used for serial
communication between computer hardware, microcontrollers etc. It is at least made of an
emitter write register, a receiver read register, two shift register (one for TX, one for RX), a clock
source and a control logic around it.
Signal lines are at high logic level ‘1’, when idle, a transmission begins with a start bit (‘0’),
followed by 5 to 9 data bits, ending with one or two stop bits(‘1’). Data bits can contain a parity
bit at the end for error checking. A common baud-rate must be selected both at the transmitter
and the receiver (due to communication’s being asynchronous).
As both transmitter and receiver need to be configured in the same way, a way of identifying the
configuration is as follows: “Baud-rate Data-bits Parity Stop Bits”, like 9600 8N1 which means
9600 kbit/s, 8 data bit, no parity bit and one stop bit (very common configuration). N is for no
parity, E is for even parity and O is for odd parity. Up to 3% of baud-rate error is tolerable in
most MCU between two sources.
Figure 97 : An 8N1 UART frame example
Most UART modules are able to detect overrun, underrun, framing or parity errors. If the
receiver’s input is at ‘0’ for too long, modules can detect a break condition and stop.
2.
Module Presentation
This microcontroller does not include an independent UART module, but UART is still available
through another communications module. The LIN Controller (LINFlex) is used for
implementing a LIN network, a slow but robust network commonly used in automotive
applications. This controller can also be used as UART because the LIN network is built on UART
hardware.
The UART mode of the LINFlex module features full duplex communications with from 7 to 9bit
frames, 4 byte transmit and receive buffers, error indicator flags, and maskable interrupts. The
LINFlex module also includes a fractional baud rate generator.

Table of Contents

Other manuals for Freescale Semiconductor MPC5604B

Related product manuals