Connect with us

Uart communication protocoals

Discussion in 'Microcontrollers, Programming and IoT' started by vead, Nov 15, 2017.

Scroll to continue with content
  1. vead


    Nov 27, 2011
    I know that the use of the Uart Protocol is used to send or receive data from one device to another. For example, if I want to send data from Microcontrlloer to PC. I can send data using uart protocol. Suppose that my name vead is store in 8051 and I want send data "vead" to PC so that I can see my name on PC screen using uart protocal.

    I understand meaning of the start and stop but I don't understand here what the start bit and stop bit ? I think the 8051 first sends the signal to PC. Which means that the PC is ready to receive the data. After that 8051 sends 8 bit data to PC. 8051 sends a stop signal to the PC

    Am i thinking right ? Does the uart work like that ?
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    The start bit indicates start of transmission of one byte. it is always logic 0.
    The stop bit indicates end of transmission of one byte. It is always logic 1.

    Simply follow the links in the Wikipedia article where you copied the above diagram, foremost the "UART Tutorial for Robotics".
    vead likes this.
  3. vead


    Nov 27, 2011
    I read, when we initialize uart then we set the timer value. Like mention in following program.The timer mode is set in the program. Lowe value high value is loaded in program. But it does not understand how the timer setting is related to the uart communication?

    // Initializing UART in 8051
    void serial_init()
        TMOD = 0x20;
        SCON = 0x50;
        TH1  = 0xFD;
        TL1  = 0xFD;
        TR1  = 1;
  4. kellys_eye


    Jun 25, 2010
    The timer values will relate to the BAUD RATE at which the communication is to be made. Faster baud rate, smaller time interval.
  5. Minder


    Apr 24, 2015
    Also if only sending ASCII characters, you can just send 7 bit data rather than 8 bit.
  6. vead


    Nov 27, 2011
    I have understood from your reply that I have to set the baud rate. I have to Set baud rate to 9600 at 11.0592MH

    I don't understand how the baud rate being set in program. Is the following line set baud rate in the program?

    TH1 = 0xFD;
    TL1 = 0xFD;
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day