09-03-2011, 12:50 PM
PRESENTED BY:
HARSHIT MEHROTRA
[attachment=9863]
Uart
UART stands for Universal Asynchronous
Receiver/Transmitter.
A UART may be used when:
High speed is not required
An inexpensive communication page link between two devices is required
UART communication is very cheap
Single wire for each direction (plus ground wire)
Asynchronous because no clock signal is transmitted
Relatively simple hardware
PC devices such as mice and modems used to often use UARTs for communication to the PC
UART FUNCTIONS
Transmitter
Convert from parallel to serial
Add start and stop delineators (bits)
Add parity bit
Receiver
Convert from serial to parallel
Remove start and stop delineators (bits)
Check and remove parity bit
SERIAL DATA TRANSMISSION
TRANSMITTER OPERATION
Microcontroller waits until TDRE = '1'
Loads data into TDR
Clears TDRE
UART transfers data from TDR to TSR
Sets TDRE
UART outputs start bit ('0') then shifts TSR right eight times followed by a stop bit ('1')
RECEIVER OPERATION
UART waits for start bit
◦ Shifts bits into RSR
When all data bits and stop bit are received
◦ RSR loaded into RDR
◦ Set RDRF
Microcontroller waits until RDRF is set
◦ Read RDR
◦ Clear RDRF