0% found this document useful (1 vote)
241 views15 pages

Usart: It Is A Communication Protocol For Serial Universal Synchronous Asynchronous Receiver Transmitter

USART (Universal Synchronous Asynchronous Receiver Transmitter) is a serial communication protocol used to transmit data between microcontrollers or between a microcontroller and computer. It uses a packet format with start bit, data bits, optional parity bit, and stop bit. Data is transmitted asynchronously by sending single bytes or synchronously by sending blocks of characters. The Arduino board uses specific pins for Rx and Tx and the USART must be enabled through software. Registers like UCSRA, UCSRB, UCSRC control the USART and store status like received/transmitted data. The baud rate for serial communication is set using the UBRRH and UBRRL registers.

Uploaded by

Prabhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
241 views15 pages

Usart: It Is A Communication Protocol For Serial Universal Synchronous Asynchronous Receiver Transmitter

USART (Universal Synchronous Asynchronous Receiver Transmitter) is a serial communication protocol used to transmit data between microcontrollers or between a microcontroller and computer. It uses a packet format with start bit, data bits, optional parity bit, and stop bit. Data is transmitted asynchronously by sending single bytes or synchronously by sending blocks of characters. The Arduino board uses specific pins for Rx and Tx and the USART must be enabled through software. Registers like UCSRA, UCSRB, UCSRC control the USART and store status like received/transmitted data. The baud rate for serial communication is set using the UBRRH and UBRRL registers.

Uploaded by

Prabhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

USART

Universal Synchronous Asynchronous Receiver


Transmitter
It is a Communication Protocol for Serial
Data Transmission developed by the EIA
Data is sent in the form of PACKETS or FRAMES which
is compose of data bits and control bits..
DATA
FIELD

DATA FIELD

STOP
BIT

PARITY
BIT

USART packet format: 1 start bit, 8 data bits, 1 parity bit, 1 stop bit.

Data Bits : 5-8 bits


Stop Bit: 0 or 1 or 2
Parity Bit : Optional (Even or Odd)

BAUD RATE : The number of Symbols


transmitted per second
Typical Values are 1200, 2400, 9600, 19200
etc..
Mode Of Transmission :
Asynchronous - Transfers a single byte at a
time.
Synchronous- Transfers a block of data
(characters) at a time.

Rx
D
Tx
D

In Robomart Arduino Board


PD0 is Receiver (RxD) Pin
2
PD1 is Transmitter (TxD)
USART
Pin 3 Needs To Be Enabled By The User Through
Software..

Serial Port
It is a set of 9 PINS used for serial data
communication between two Cs or between
C and a Computer

THIS IS
SERIAL
PORT

RS-232
The RS-232 standard defines the voltage levels
that correspond to logical one and logical zero
levels in serial communication..
Valid signals are plus or minus 3 to 15 volts.
The range near zero volts is not a valid RS-232
level..
Logic one is defined as a negative voltage and
logic zero is positive..

Voltage Levels in Our Microcontroller are


Logic High= 5Volt
Logic Low= 0 Volt

How Can a microcontroller communicate by usin


RS-232 Standard ??
Solution MAX
is
232 IC

MAX 232 Connection

USART I/O DATA REGISTER

This Register stores the data to be transmitted or


data
being Received
UDRE bit in UCSRA Register should be set
and transmitter to be enabled for Data
Transmission

UCSRA-USART Control and Status


Register A

RXC bit is set when data is available in the


receive buffer and cleared when the
receive buffer is empty..
TXC bit is set when data transmission is
complete
UDRE bit is set when transmit buffer (UDR)
is ready to receive new data

UCSRB-USART Control and Status


Register B

RXCIE: Receive Complete interrupt will be generated if RXCIE bit


is set.
TXCIE: Transmit Complete interrupt will be generated if TXCIE bit
is set.
UDRIE: Data Register Empty interrupt will be generated if UDRIE
bit is set.
RXEN: To enable the USART receiver ..
TXEN: To enable the USART transmitter..

UCSRC-USART Control and Status


Register C

URSEL: This bit must be one to write the


UCSRC...
SEL:
To select between Asynchronous and Synchron
de..
UPM1 & UPM0: To Select Parity Bit..
USBS : To Select Stop Bit..
UCZ1 & UCZ0: To Select Character Size..
UCPOL: To Select Clock Polarity..

UBRRL &UBRRH-USART Baud Rate


Register

This Register Stores The Value of Baud rate .


To write in the UBRRH , URSEL bit must be
zero.

THANK YOU

You might also like