OSU ECE 473 - USART and Asynchronous Communication (15 pages)

Previewing pages 1, 2, 3, 4, 5 of 15 page document View the full content.
View Full Document

USART and Asynchronous Communication



Previewing pages 1, 2, 3, 4, 5 of actual document.

View the full content.
View Full Document
View Full Document

USART and Asynchronous Communication

49 views

Other


Pages:
15
School:
Oregon State University
Course:
Ece 473 - Microcontroller System Design

Unformatted text preview:

USART and Asynchronous Communication The USART is used for synchronous and asynchronous serial communication USART Universal Synchronous Asynchronous Receiver Transmitter Our focus will be on asynchronous serial communication Asynchronous communication does not use a clock to validate data Serial data is transferred one bit at a time Asynchronous serial interfaces are cheap easy to use and until recently very common USB is well on its way to replace the serial comm ports on PCs The USART communicates in a full duplex mode simultaneous xmit rcv USART and Asynchronous Communication Serial frame format Every frame will have at least one start bit some data bits 5 6 7 8 or 9 one stop bit Parity is optional USART and Asynchronous Communication How can two asynchronous devices communicate with each other AVR2 16Mhz AVR1 16Mhz There is no known phase relationship between the two AVR boards How can a receiving board know where the center of a bit frame is How can it know where the start bit is 0 start bit What do we need to know 1 2 3 USART and Asynchronous Communication Need to know how fast the bits are coming baud rate Need to know where the start bit begins its falling edge Then we know when to sample 0 1 sample sample 2 3 start bit sample sample USART and Asynchronous Communication The USART uses a 16x internal clock to sample the start bit The incoming data is continuously sampled until a falling edge is detected Once detected the receiver waits 6 clocks to begin sampling One clock before the expected center of the start bit 3 samples are taken If 2 or 3 are detected as high the search for another falling edge is started If at least one sample is low the start bit is validated If so begin sampling 16 clocks from center of start bit Revalidate again with each data byte Synchronization happens on each byte USART and Asynchronous Communication The USART internal clock is set by the UBRR register The internal clock is derived from the internal CPU clock Both transmitter



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view USART and Asynchronous Communication and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view USART and Asynchronous Communication and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?