In this post, we will look closer to UART communication that I’ve been wondered how it works for a long time.
Unfortunately, in my university life, the only devices I can use this communication method are Arduino devices. Implementation of this communication is so easy on Arduino, just put a command to send and receive, even you don’t know the data type that you want to send. However, I’ve been wondered always how it works in details, how it understands the data type and how it sends them on the physical layer? Finally, here is my observation for me for future-use and for the other enthusiastic people. I analyzed it!
I implemented the code on an AVR microcontroller called ATMega328P. Here is the code;
ATMega328P USART TX Code by swharden
NOTE: I removed the lines of 12th,48th and 49th.
You can find the reason why I removed the line of 12th if you look at the datasheet. It is related to default pre-configuration.
Here is the output of my logic analyzer:
Leave a Reply