Comments on: Basics of UART Communication http://www.circuitbasics.com/basics-uart-communication/ Raspberry Pi, Arduino, and DIY Electronics Projects and Tutorials Mon, 22 Jan 2018 02:48:22 +0000 hourly 1 By: Tom Storey http://www.circuitbasics.com/basics-uart-communication/#comment-15220 Wed, 20 Dec 2017 08:14:17 +0000 http://www.circuitbasics.com/?p=420650#comment-15220 The clocks of the two systems do not need to be synchronised in any way, and they can run at entirely different speeds.

UART is self-timed – each individual bit occupies a specific amount of time based on the configured baud rate, e.g. ~104uS at 9600 baud (1 / 9600). So the key to making this work, using 9600 baud as an example, is that the transmitter needs to alternate the TX pin at 104uS intervals, and the receiver needs to sample its RX pin at 104uS intervals to reconstruct what has been sent. The receiver starts this process once it sees the start bit.

If the transmitter or receiver differ significantly enough in this measurement because they have such different baud rates configured, then the rate at which the transmitter alternates its TX pin and the rate that the receiver samples its RX pin means you either miss entire bits, or read the same bit more than once.

10% of error is way too much and is a bad suggestion. See: https://www.allaboutcircuits.com/technical-articles/the-uart-baud-rate-clock-how-accurate-does-it-need-to-be/

]]>
By: Tom S http://www.circuitbasics.com/basics-uart-communication/#comment-15213 Wed, 20 Dec 2017 07:27:15 +0000 http://www.circuitbasics.com/?p=420650#comment-15213 It is a very confusing statement, because I2C and SPI perform a similar low level task – transmitting and receiving bytes between devices.

A UART doesnt have to be a physical IC, and it doesnt even need to be circuitry inside a microcontroller – just like I2C and SPI it can be implemented entirely in software by “bit banging” general purpose I/O pins.

]]>
By: Karthik gv http://www.circuitbasics.com/basics-uart-communication/#comment-15212 Wed, 20 Dec 2017 07:23:35 +0000 http://www.circuitbasics.com/?p=420650#comment-15212 After a long days after completing engineering understood the concept of UART
Thanks for sharing.

]]>
By: RK http://www.circuitbasics.com/basics-uart-communication/#comment-13225 Mon, 27 Nov 2017 09:50:47 +0000 http://www.circuitbasics.com/?p=420650#comment-13225 Thank you soo much.. Thanks a ton. Really U ppl had done a great job. Now seriously I understood the working principle, data transmission of bits and everything without any doubt. Thanks again and again. Hope you upload more and more sessions and concepts like this.

]]>
By: dinesh aitha http://www.circuitbasics.com/basics-uart-communication/#comment-11473 Mon, 30 Oct 2017 15:17:15 +0000 http://www.circuitbasics.com/?p=420650#comment-11473 10% come fromm start and stop bits and parity too

]]>
By: Hari http://www.circuitbasics.com/basics-uart-communication/#comment-11424 Mon, 30 Oct 2017 06:55:27 +0000 http://www.circuitbasics.com/?p=420650#comment-11424 Why we using 9bits institute data transmission

]]>
By: Flash9325 http://www.circuitbasics.com/basics-uart-communication/#comment-8689 Tue, 26 Sep 2017 23:21:08 +0000 http://www.circuitbasics.com/?p=420650#comment-8689 1) The two UARTs communicating having the same baud rate, does that mean the clocks of both the UARTs are synchronized ( i.e clock cycle starts and stops at the same time) ?

I didnt get from where that allowed difference of 10% came from. Can you please explain!!!

]]>
By: Taskeen http://www.circuitbasics.com/basics-uart-communication/#comment-7578 Sun, 10 Sep 2017 13:54:25 +0000 http://www.circuitbasics.com/?p=420650#comment-7578 Thank you for this beautiful explanation.. Great

]]>
By: k.sudheer kumar http://www.circuitbasics.com/basics-uart-communication/#comment-4452 Thu, 13 Jul 2017 05:11:46 +0000 http://www.circuitbasics.com/?p=420650#comment-4452 It is an nice explanation .Thank you

]]>
By: thoshif khan http://www.circuitbasics.com/basics-uart-communication/#comment-4419 Wed, 12 Jul 2017 06:30:57 +0000 http://www.circuitbasics.com/?p=420650#comment-4419 i am working on UART so any body can send VHDL CODE to my mail thoshifkhan1992@gmail.com

]]>
By: Hemavathi http://www.circuitbasics.com/basics-uart-communication/#comment-3200 Mon, 15 May 2017 08:25:44 +0000 http://www.circuitbasics.com/?p=420650#comment-3200 Really good explaination. Now i understood very clearly what exactly The UART performs internally

]]>
By: k t r http://www.circuitbasics.com/basics-uart-communication/#comment-2432 Tue, 04 Apr 2017 12:26:55 +0000 http://www.circuitbasics.com/?p=420650#comment-2432 Awsome explenation really

]]>
By: Chandru http://www.circuitbasics.com/basics-uart-communication/#comment-2320 Thu, 23 Mar 2017 08:33:41 +0000 http://www.circuitbasics.com/?p=420650#comment-2320 Can anyone say how can I transmit 1000 bytes of data through uart protocol

]]>
By: ankur singh http://www.circuitbasics.com/basics-uart-communication/#comment-2312 Tue, 21 Mar 2017 10:12:44 +0000 http://www.circuitbasics.com/?p=420650#comment-2312 It is really a very good explanation as i m not from electrical background.

]]>
By: Syed Ibrahim http://www.circuitbasics.com/basics-uart-communication/#comment-2230 Wed, 08 Mar 2017 04:19:36 +0000 http://www.circuitbasics.com/?p=420650#comment-2230 Good post. Its in a language everyone can understand. But i also want to know how communication (data transfer) between data bus and UART occurs.

]]>
By: Harshal http://www.circuitbasics.com/basics-uart-communication/#comment-2092 Thu, 02 Feb 2017 04:47:53 +0000 http://www.circuitbasics.com/?p=420650#comment-2092 Parity bit is that it show that how many bit are there and if there are even number is there then it will pass bit 1 or bit 0

]]>
By: nagul sharief http://www.circuitbasics.com/basics-uart-communication/#comment-2043 Thu, 19 Jan 2017 10:05:59 +0000 http://www.circuitbasics.com/?p=420650#comment-2043 i’m not understanding of parity bit

]]>
By: Harshal http://www.circuitbasics.com/basics-uart-communication/#comment-2018 Wed, 04 Jan 2017 10:40:34 +0000 http://www.circuitbasics.com/?p=420650#comment-2018 no uart does not support the usb ports

]]>
By: karthik http://www.circuitbasics.com/basics-uart-communication/#comment-2012 Mon, 02 Jan 2017 11:02:44 +0000 http://www.circuitbasics.com/?p=420650#comment-2012 thanks for the good information. simple and best.

]]>
By: rk yadav http://www.circuitbasics.com/basics-uart-communication/#comment-1981 Thu, 22 Dec 2016 05:40:20 +0000 http://www.circuitbasics.com/?p=420650#comment-1981 good explanation to thanks

]]>
By: OF http://www.circuitbasics.com/basics-uart-communication/#comment-1977 Tue, 20 Dec 2016 23:07:13 +0000 http://www.circuitbasics.com/?p=420650#comment-1977 “It’s not a communication protocol like SPI and I2C, but a physical circuit in a microcontroller, or as a separate IC”.

This part confuses me. I understand that UART is a physical hardware IC, but it must also be a protocol because how else would there be communication? The bits can’t just be sent randomly. Data is sent through packets just like you described in a timely matter and specific order. Isn’t that in essence a protocol? Thanks.

]]>
By: ArchonOSX http://www.circuitbasics.com/basics-uart-communication/#comment-1970 Sun, 18 Dec 2016 14:17:56 +0000 http://www.circuitbasics.com/?p=420650#comment-1970 Your analysis is correct. That is why parity checking is rudimentary and may not prevent all errors. But the odds of two bits being changed is much higher than just one so this method works in most cases of low level hardware communication.

]]>
By: vj http://www.circuitbasics.com/basics-uart-communication/#comment-1961 Fri, 16 Dec 2016 13:05:27 +0000 http://www.circuitbasics.com/?p=420650#comment-1961 very good expaination. I have one question that we also use Usb micro port for connectiing uart hardware and the other USB port type A to our laptop. How does it work? does uart support USB ports also?

]]>
By: haleem http://www.circuitbasics.com/basics-uart-communication/#comment-1947 Sun, 11 Dec 2016 15:38:37 +0000 http://www.circuitbasics.com/?p=420650#comment-1947 Nice one!

]]>
By: saks http://www.circuitbasics.com/basics-uart-communication/#comment-1943 Wed, 07 Dec 2016 04:44:52 +0000 http://www.circuitbasics.com/?p=420650#comment-1943 really easy of understanding and way of explanation is good

]]>
By: hardik tank http://www.circuitbasics.com/basics-uart-communication/#comment-1932 Sat, 03 Dec 2016 06:10:18 +0000 http://www.circuitbasics.com/?p=420650#comment-1932 well explanation,and its easy to understand
friendly explanation ,,nice
thanx

]]>
By: rajkumar http://www.circuitbasics.com/basics-uart-communication/#comment-1926 Wed, 30 Nov 2016 09:58:08 +0000 http://www.circuitbasics.com/?p=420650#comment-1926 Well explanation

]]>
By: Olivia Christy http://www.circuitbasics.com/basics-uart-communication/#comment-1853 Fri, 04 Nov 2016 07:01:34 +0000 http://www.circuitbasics.com/?p=420650#comment-1853 Nice work. As a begginer this helps me a lot .can you do this for uart with interrupts also

]]>
By: Ricky http://www.circuitbasics.com/basics-uart-communication/#comment-1818 Thu, 27 Oct 2016 18:32:27 +0000 http://www.circuitbasics.com/?p=420650#comment-1818 Correct, the receiver will not notice the error, but, pending good design of the hardware, this is going to be a rare case.

]]>
By: Randall http://www.circuitbasics.com/basics-uart-communication/#comment-1806 Mon, 24 Oct 2016 16:34:38 +0000 http://www.circuitbasics.com/?p=420650#comment-1806 This was helpful but I’m unsure about one thing. If two bits gets flipped in error, wouldn’t the total still match with the parity bit? Or more generally, if an even number of bits get flipped in error, the error won’t be detected. Is that right?

]]>
By: Volthaus Electronics Laboratory http://www.circuitbasics.com/basics-uart-communication/#comment-1755 Tue, 11 Oct 2016 03:50:18 +0000 http://www.circuitbasics.com/?p=420650#comment-1755 Excellent.

]]>
By: Ramesh Mote http://www.circuitbasics.com/basics-uart-communication/#comment-1745 Sat, 08 Oct 2016 20:00:06 +0000 http://www.circuitbasics.com/?p=420650#comment-1745 its very good explanation. thnks a lot.

]]>
By: rekula raviteja http://www.circuitbasics.com/basics-uart-communication/#comment-1727 Tue, 04 Oct 2016 12:36:15 +0000 http://www.circuitbasics.com/?p=420650#comment-1727 It’s a good explanation.

]]>
By: VIKAS S DEV http://www.circuitbasics.com/basics-uart-communication/#comment-1686 Mon, 26 Sep 2016 07:21:52 +0000 http://www.circuitbasics.com/?p=420650#comment-1686 Well Explained and Nice Article.Thank You 🙂

]]>
By: Dinesh Yadav http://www.circuitbasics.com/basics-uart-communication/#comment-1685 Mon, 26 Sep 2016 07:09:05 +0000 http://www.circuitbasics.com/?p=420650#comment-1685 Its Beautifully Explained. Frankly Speaking, After a hell lot of search over Internet and books, THis is the only Place where I literally Understood what Exactly UART is and its working.
Thanks a Lot guys.

A request: can you write another article to Explain How Exactly an IC (made of transistors) Adds these bits (Start,parity,stop) and Removes them. I mean how exactly they do this intelligent stuff at Electronics level ? Please explain its Circuit basics. 🙂

]]>
By: vivek http://www.circuitbasics.com/basics-uart-communication/#comment-1280 Thu, 02 Jun 2016 04:43:43 +0000 http://www.circuitbasics.com/?p=420650#comment-1280 Nice one. But there is a scope of introducing RS232 concept here

]]>