how does UART work??? (explained clearly)

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ส.ค. 2017
  • UART is one of the many ways that computers communicate with each other. In this video I explain how UART transmission works. It all comes down to how voltages represent bits that make up binary data. In my demonstration I am using an Arduino board to generate The data signal and a RIGOL DS 1102E oscilloscope to visualize that signal. Comments, questions, and concerns are welcome. Thanks for watching!

ความคิดเห็น • 219

  • @Portergetmybag
    @Portergetmybag 3 ปีที่แล้ว +3

    You have no idea how much just cleared up in my head. Usually when I watch the video I’m like, “yeah but why?” Thank you for explaining EVERYTHING

  • @phillipbartlett1819
    @phillipbartlett1819 4 ปีที่แล้ว +23

    Well done. I'm a old timer in electronics but never got into computers. Now that I'm playing catch up I'm having a hard time finding a place to go for good explanation of things. You did a great job. Keep it up

    • @martinkuliza
      @martinkuliza ปีที่แล้ว +2

      Phillip, Hi mate
      I'm also an old timer in electronics, Now we can debate who is the older old timer by all means :P but let's wait until formal introductions have taken place shall we because i could turn out to be the old fart (who knows)
      Anyway mate, if you want to play catch up, Feel free to contact me
      i'm also an I.T. Engineer so you can ask me about Electronics (although i imagine you won't need to ) and you can ask me anything about computing and telecommunications.
      and let's be honest, (at least back in my day ) what computers was there to get into ?
      i mean for me it was Atari and Commodore 64, yes we had Pear, Wang and so on by who had one of those... i never knew anyone
      and yes i did get into Basic Programming at the tender age of around 8 (or thereabouts) but other than that we had our good old 150 in 1 Dick Smith Electronics kits and we tinkered with Electronics so yeah not everyone got into computers
      so.. Feel free to ask and play catch up if you want mate, i'm happy to have a chat anytime you are we can do skype , zoom whatever, have a chat , talk some shit, whatever tickles your fancy
      Be cool mate

  • @xtremejennbase
    @xtremejennbase 2 ปีที่แล้ว +15

    This is a perfect explanation of UART and I like how you covered baud rate and the fact that it transmits by LSB first.

  • @steveng5503
    @steveng5503 4 ปีที่แล้ว +21

    Great starting point for those looking to understand UART without going into math. I’m sure this video will continue to be useful for sometime to come. 👍 from me! 🇬🇧

  • @execration_texts
    @execration_texts 4 ปีที่แล้ว +2

    That's about the clearest I've ever had anything explained to me. You've earned a subscriber.

  • @danyjoe7741
    @danyjoe7741 2 ปีที่แล้ว

    Watched this today for my exam, helped a lot in understanding how UART actually works, thanks a bunch

  • @strauss334
    @strauss334 6 ปีที่แล้ว +23

    Thanks a lot! That's what I call "clear explanation".

  • @marklee1209
    @marklee1209 2 ปีที่แล้ว +1

    This is ace! I’ve used comms for years between devices, and taken that it’s always worked. Setup the correct comms settings and away it goes. but I’m now at a stage where I’ve got to take comms signal from an old device and manipulate it to deliver something readable. This has helped me understand how it is sent and received. Knowing this gives me some idea how to move forward from here. Thanks!

  • @burlapjack8345
    @burlapjack8345 5 ปีที่แล้ว +9

    Thank you for making this video. Dummies like me usually have a hard time with concepts like this. I appreciate your thorough explanation.

  • @johnjacobsen802
    @johnjacobsen802 3 ปีที่แล้ว +2

    Thanks a bunch for this clear explanation! Makes perfect sense. Your drawings helped to visualize what is happening.

  • @templocal
    @templocal 3 ปีที่แล้ว

    Huge thumbs up. Your video explains what the greedy colleges of mine on a job I left didn't want to explain to me. A huge thumbs up for your job!

  • @alpyldrm8448
    @alpyldrm8448 4 ปีที่แล้ว +4

    Thanks for that. It was pretty smooth way to explain UART.

  • @MrVecheater
    @MrVecheater 4 ปีที่แล้ว

    Finally an explanation with a real world example
    That helped a lot

  • @jimivie
    @jimivie 3 ปีที่แล้ว +1

    George McFly you're awesome at explaining UART. Thank you!

  • @VincentRiquer
    @VincentRiquer 4 ปีที่แล้ว +14

    Great video, I wonder why TH-cam waited so long to promote it!
    One small correction though, baudrate is not necessarily the same as the nitrate. In the simple case of UART, it is. Baudrate is defined as the number of change to the signal per second. In modulations like QAM, the baudrate is lower than your bitrate, as one phase shift encodes more than one bit.

  • @playharder1435
    @playharder1435 2 หลายเดือนก่อน

    bit-by-bit, this video adds to my understanding of UARTS... thanks

  • @fatty-it-man
    @fatty-it-man 3 หลายเดือนก่อน

    Great!! Simple and clear, without not unnecessary details!

  • @leonjones7120
    @leonjones7120 4 ปีที่แล้ว

    great, simple to grasp, well done!

  • @JStation3
    @JStation3 6 ปีที่แล้ว

    Cool presentation man, I totally get it now. Well done!

  • @mrtmrf5007
    @mrtmrf5007 4 ปีที่แล้ว

    very good explanation sir , as gentleman below said it is the clearest ....so now im very clear..thank you for your works, you got another subscriber too

  • @ahoorabagheri6857
    @ahoorabagheri6857 4 ปีที่แล้ว

    WOW!!!
    It was amazing!
    Thank you so much

  • @paramhansnabar7848
    @paramhansnabar7848 2 ปีที่แล้ว

    O wow 😂😂. No seriously this is the best explanation about data transmission. Thanks for making this video

  • @ahmadmu6503
    @ahmadmu6503 6 ปีที่แล้ว +1

    Thanks, Great explanation.

  • @kortt
    @kortt 5 ปีที่แล้ว

    Great explanation, thanks!

  • @piethelderop8085
    @piethelderop8085 3 ปีที่แล้ว

    super well explanation of this , clear and easy to understand. please continue with this :-)

  • @TheReegus
    @TheReegus หลายเดือนก่อน

    Top work mate. I am a sparky and am familiar with a lot of concepts but UART is not one. This is a great explanation.

  • @kbcbala
    @kbcbala 3 ปีที่แล้ว

    Mate Awesome. Well done. Wonderful explanation for beginners.

  • @Middlemen101
    @Middlemen101 6 ปีที่แล้ว +1

    Thank you for the education!

  • @mmustho7740
    @mmustho7740 4 ปีที่แล้ว

    Very clear explanation. Thanks.

  • @grzesiek1x
    @grzesiek1x 2 ปีที่แล้ว +1

    I have experimented with my Arduino and with oscilloscope device is really fascinating what we can do! I made my own code for communicating with my computer (very easy) and it works! People even don;t think that there are thousands of possibilities and only open mind is needed for ideas! People seem to be like sheeps. One man invents something and then everybody uses it but withut realising that there is not only one solution or way how to do it and how to communicate , send/ receive signals etc. Just my own reflection ;)

  • @user-mv2bw7lg8z
    @user-mv2bw7lg8z 27 วันที่ผ่านมา

    Excellent intro. Thank you!

  • @Balasubramanian-dy5fp
    @Balasubramanian-dy5fp 2 ปีที่แล้ว

    Awesome explanation!

  • @Bianchi77
    @Bianchi77 10 หลายเดือนก่อน

    Nice info, well done, thanks for sharing it:)

  • @rkgki
    @rkgki 4 ปีที่แล้ว

    Thanks! Very well explained.

  • @darkseiddoom
    @darkseiddoom 3 ปีที่แล้ว

    Great explanation sir!

  • @Chris-on5bt
    @Chris-on5bt 2 ปีที่แล้ว

    Great video, Thank you!

  • @josegonzalez-ro3se
    @josegonzalez-ro3se 3 ปีที่แล้ว

    Thanks man, it was very clear.

  • @danielgoodman3578
    @danielgoodman3578 ปีที่แล้ว

    I'm watching your video to help me review/understand UART before diving into learning how to use it on a dsPIC33.
    But I notice quite clearly that you're left-handed. I am not, but my dad is. It is a foreign world to me. My dad may still have his left hander's coffee mug, which has a hole on one side (and thus a limit to how much you can fill it), restricting it to be used with the left hand. Right handers will spill coffee on themselves with it unless they awkwardly try to cover the hole with their lower lip.

  • @williamgraham8761
    @williamgraham8761 4 ปีที่แล้ว

    Thanks, nice clear explanation. 😁

  • @HasithaSameeraNova
    @HasithaSameeraNova หลายเดือนก่อน

    Thank you for this clear explanation ❤💯

  • @digihz_data
    @digihz_data 3 ปีที่แล้ว

    Very well explained.

  • @felixgspandl
    @felixgspandl ปีที่แล้ว

    Thx man you really helped me with my school presentation

  • @NightmareCrab
    @NightmareCrab 4 ปีที่แล้ว +2

    I learned something, thanks.

    • @DeoMachina
      @DeoMachina 4 ปีที่แล้ว

      aka L I L B R O O M S T I K

  • @chelsea028
    @chelsea028 2 ปีที่แล้ว

    very clearly explained with example

  • @haksgayashan6264
    @haksgayashan6264 5 ปีที่แล้ว +4

    Would you plz tell me how did you give the message to the arduino..? I'll be more helpful to understand that clearly..

  • @jcpartri
    @jcpartri 2 ปีที่แล้ว

    I learned something today! :-)

  • @PieterDaarth
    @PieterDaarth 3 ปีที่แล้ว

    Good Job! Many Thanks.

  • @bassome3000ify
    @bassome3000ify 6 ปีที่แล้ว +3

    Thank you very much! Subscribed for clear explanations :DD

  • @cemsarl5746
    @cemsarl5746 3 ปีที่แล้ว

    Amazing explanation

  • @azwara.9821
    @azwara.9821 5 ปีที่แล้ว +2

    how much the delay time between start and the first binary code? and also after the last binary code (8th bit which is 0 in regular ASCII) how long the time delay. This is very important to differentiate between each byte data when sending and receiving.
    so with 9600 bps (9600 baud rate with 1 bit per signal), 1 bit closely to 104.1667 microsecond pulse time right? What is the maximum baud rate can be used (or bps) for arduino uno with 16MHz oscillator?
    in your oscilloscop, what pin was used for positive terminal?

  • @kumar_kiran
    @kumar_kiran 5 ปีที่แล้ว +8

    Can you also make similar video explaining SPI, I2C as well?

  • @varghesecherian4491
    @varghesecherian4491 5 ปีที่แล้ว

    very clear explanations.....

  • @louisparisi1
    @louisparisi1 2 ปีที่แล้ว

    Great vid, thanks

  • @muhammed5402
    @muhammed5402 10 หลายเดือนก่อน

    Perfect explanation. thx

  • @mirmos
    @mirmos 6 หลายเดือนก่อน

    thanks a lot! this is a clear explanation ^^

  • @alexnoggle1874
    @alexnoggle1874 ปีที่แล้ว

    loved this video

  • @adampaech2469
    @adampaech2469 ปีที่แล้ว

    Very good video, thanks

  • @tonypitsacota2513
    @tonypitsacota2513 9 หลายเดือนก่อน

    Can you recommend your 1102? I am shopping for scopes now and it seems to be popular.

  • @hslimsteven1
    @hslimsteven1 4 ปีที่แล้ว

    Very good tutorial video.

  • @everybodyisdyingaminext5675
    @everybodyisdyingaminext5675 5 ปีที่แล้ว

    very good...keep going

  • @tjnguyen746
    @tjnguyen746 3 ปีที่แล้ว

    Thanks. Please for good
    explaination !

  • @Galakyllz
    @Galakyllz 2 ปีที่แล้ว +1

    What if the first and last bits are 1s? How does it know when to start reading the high bit and/or to stop reading the last high bit since it starts high?
    Thanks for the video.

  • @ceilingwalker1
    @ceilingwalker1 3 หลายเดือนก่อน

    Very Nice!!!!! Thank you

  • @TT-ud5gf
    @TT-ud5gf 2 ปีที่แล้ว

    super clear!

  • @scimad
    @scimad 5 ปีที่แล้ว +192

    Play at 1.25x speed and no thanks needed.

    • @sagar8964
      @sagar8964 5 ปีที่แล้ว +2

      thanks

    • @masterlares2671
      @masterlares2671 4 ปีที่แล้ว +1

      Thats Great! thanks

    • @taejunchang396
      @taejunchang396 4 ปีที่แล้ว +2

      Madhav Humagain thnz

    • @still-dreaming
      @still-dreaming 4 ปีที่แล้ว +11

      its even better at 2x speed :)

    • @mario2872
      @mario2872 4 ปีที่แล้ว +2

      hahahahaha, I didnt expected result so perfect like this xD

  • @oncom81
    @oncom81 3 ปีที่แล้ว

    Hi, how much time uart timeout in Rx buffer, in the loop. Is it available on whole time when no new data coming in?
    Thx for answering...

  • @ycombinator765
    @ycombinator765 ปีที่แล้ว

    exceptionally simple

  • @justinc2633
    @justinc2633 5 หลายเดือนก่อน

    so when a company like espressif makes their mcu and its flashed using uart, is there a standart for bits that would represent "start" "stop" "acknowledge" etc, or is that purely determined by the product manufacturer?

  • @mayandiraja3862
    @mayandiraja3862 3 ปีที่แล้ว

    Really nice vide

  • @lozD83
    @lozD83 3 ปีที่แล้ว +6

    Meanwhile on The Discovery Channel: "How to know when it's time to blow your nose" 😉

  • @agustinothadeus
    @agustinothadeus 5 ปีที่แล้ว

    Thank you, very well explained and demonstrated video although the scribbling at the beginning was a bit irritating for me, how did you connect the oscilloscope to the pins....is it Tx and ground?

    • @continuousload3963
      @continuousload3963  5 ปีที่แล้ว

      Yes, it is Tx and ground. And yes, I could have used a better format than scribbling :) I think that it feels natural to teach electronics with pen and paper, but it is difficult to do correctly on film - I'll have to experiment with my approach. Thank you for the respectful comment. If I may ask, what improvements would you do with the format?

    • @travelimmortal
      @travelimmortal 5 ปีที่แล้ว

      Hi there , are you sure you have connected only TX & GND and not TX+RX & GND ?

  • @polishhammer1992
    @polishhammer1992 4 ปีที่แล้ว

    While what you did explain made sense and was clear I wish a brief rundown of how you sent the bits took place.

  • @paulkarkarin466
    @paulkarkarin466 2 ปีที่แล้ว

    Спасибо. Понятно, интересно.

  • @wesamsalih9020
    @wesamsalih9020 5 ปีที่แล้ว

    very nice thanks

  • @Eduard_Kolesnikov
    @Eduard_Kolesnikov 9 หลายเดือนก่อน

    Thank you man

  • @jimhinkle7245
    @jimhinkle7245 3 ปีที่แล้ว

    Thank you!

  • @ulysses_grant
    @ulysses_grant 2 ปีที่แล้ว

    Left-handed people explains it better. Cheers ma lad!

  • @abhijith1605
    @abhijith1605 6 ปีที่แล้ว +1

    thanks a lot !

  • @juststupid
    @juststupid 6 ปีที่แล้ว

    Helpful

  • @Thomas-bs2em
    @Thomas-bs2em ปีที่แล้ว

    Great explanation! Can you please publish the code that your Arduino is running for this demo? THX!

  • @yltfy
    @yltfy 5 ปีที่แล้ว

    Nice video.

  • @belleluze
    @belleluze 3 ปีที่แล้ว +1

    9:16 4 cycles would be 1÷9600 = 104uS this would be one bit every 104uS? Is this correct?

  • @meghanamegha281
    @meghanamegha281 4 ปีที่แล้ว

    How did dat Arduino board sent dat o...which is the transmittere here?

  • @chennakrishna6377
    @chennakrishna6377 6 ปีที่แล้ว +2

    Thanks. Really good explanation. Small question, How much time it takes to transmit the first bit after the start (falling edge)?

    • @continuousload3963
      @continuousload3963  6 ปีที่แล้ว +4

      Both a start condition and a stop condition last one "bit cycle." That means that to transmit 8 bits of data, it actually takes 10 bit cycles! Remember that the bit cycle is the inverse of the baud rate, so if I am running at 115200 buad, my bit cycle is 1/115200 or 8.7 microseconds. If you take a look at the oscilloscope at 10:13, you can see that the voltage stays at 0 after the falling edge for about ~9 microseconds (each grid block on the screen represents 20 microseconds) before going high for the first four data bits (which where all 1's). Does that make sense?

    • @chennakrishna6377
      @chennakrishna6377 6 ปีที่แล้ว +1

      Continuous Load . Yes. Thank you very much.

  • @Slipping_thru_the_Seams
    @Slipping_thru_the_Seams ปีที่แล้ว

    thank you!

  • @MatthewSuffidy
    @MatthewSuffidy ปีที่แล้ว

    The serial in the arduino case is ttl level and not usual rs-232. That means it is inverted and in a different voltage range like 0-5v and not +/- 2.5 v or all the way to +/- 15 v.

  • @cessromer7078
    @cessromer7078 2 ปีที่แล้ว

    I would like to know the source code you wrote in arduino IDE ?

  • @taghreedkhb7
    @taghreedkhb7 2 ปีที่แล้ว

    thank you so much

  • @iamshivaramakrishna
    @iamshivaramakrishna 10 หลายเดือนก่อน

    Hello👋,
    @Continuous Load YTchannel..
    Thank you So much for sahring valuable information...👌
    It's very helpful to easy and real understading of UART Protocol...
    way of explaining and output showing on Digital oscilloscope.

  • @mrtmrf5007
    @mrtmrf5007 4 ปีที่แล้ว +2

    i had a question if i send a long string "this is a demo", does it still sent binary from the end of sentence ?

    • @shadowhalo123
      @shadowhalo123 4 ปีที่แล้ว

      the string is split into characters, that is 't' 'h' 'i' 's' ... and then each character is sent as binary, but you send the first character, that is 't' from "the end", so you send the first letter from LSB to MSB, then h LSB to MSB, and so on

  • @johnjoyce
    @johnjoyce 5 ปีที่แล้ว +1

    Really good overall. Better audio, better lighting and more practice would make this a great classroom lecture even.

    • @continuousload3963
      @continuousload3963  5 ปีที่แล้ว

      Appreciate the comment! And who knows, maybe it will be a classroom lecture someday :)
      You advice sounds like it comes from experience. Have you / do you teach classes?

    • @jvsnyc
      @jvsnyc 5 ปีที่แล้ว

      @@continuousload3963 The audio is already better than many other videos, but I will second the request to use a writing implement that doesn't make scratchy sounds over headphones or audio that is turned up.

  • @chelsea028
    @chelsea028 2 ปีที่แล้ว

    beautiful

  • @WistrelChianti
    @WistrelChianti 3 ปีที่แล้ว

    What happens if there is a 1 on the far left? How to tell the difference between that and the usual "no data" state?

  • @ShivamKumar-ky6vm
    @ShivamKumar-ky6vm 2 ปีที่แล้ว

    AWEOME LECTURE

  • @amarachukwuobi8602
    @amarachukwuobi8602 3 ปีที่แล้ว

    Great!

  • @ameiliaw8191
    @ameiliaw8191 2 ปีที่แล้ว

    Thank You

  • @ranellabjata5170
    @ranellabjata5170 2 ปีที่แล้ว

    Thanks sir

  • @darieh4909
    @darieh4909 2 ปีที่แล้ว

    thanks !

  • @sagarkokate619
    @sagarkokate619 6 ปีที่แล้ว +2

    Whats the use of clock pule in uart and the receiver,and how it helps to transfer the data ?? please explain that ..

    • @continuousload3963
      @continuousload3963  6 ปีที่แล้ว +8

      Good question. UART is different from other serial protocols (like SPI or I2C) because it doesn't use a clock pin at all. This of course means that both the sender and receiver must be pre-configured to use the same baud rate. For example, if I have an Arduino sending a message at 9600 baud (bits/second), I need to tell the Serial Moniter program on my computer to listen at 9600 baud as well, otherwise the bit values will get read at the wrong time.
      Does that answer your question?
      Some serial protocols do use a clock pulse. Consider SPI (Serial Peripheral Interface) which has a clock pulse wire to signal the receiver when to read the next bit. As a result, baudrate does not matter to SPI devices since the master sets the pace with the clock pulse.

    • @dexteraparicio7418
      @dexteraparicio7418 5 ปีที่แล้ว +1

      @@continuousload3963 I have been long mystified by parity bits and how it is able to verify data integrity. If there is only 1 bit that flipped, then the parity bit can detect the corruption and will therefore cause a retransmit. However, the parity mechanism cannot detect if there are two bits that flipped. Can you shed some light on this aspect ?

    • @continuousload3963
      @continuousload3963  5 ปีที่แล้ว +2

      @@dexteraparicio7418 you are absolutely right - the use of a parity bit is only good for detecting an odd number of corrections - if one or three or five bits are corrupted, the parity bit will change, but if two or four or six bits are corrupted, the parity bit will remain unchanged and the corruption will go undetected.
      Thankfully having two bits corrupted is statistically less likely than only one, but in a system where data integrity is critical, the person designing the system will have to implement a more advanced error detection protocol. That said, considering how cheap the parity bit is to compute, you might as well use it since it's there :)

  • @sanjidajui5146
    @sanjidajui5146 ปีที่แล้ว

    9600bps is voice band velocity ?