Skip to main content
Visitor II
October 10, 2005
Question

LinSCI - what is the difference between TC bit and TDRE bit ?

  • October 10, 2005
  • 3 replies
  • 948 views
Posted on October 10, 2005 at 08:05

LinSCI - what is the difference between TC bit and TDRE bit ?

    This topic has been closed for replies.

    3 replies

    omatzaAuthor
    Visitor II
    October 9, 2005
    Posted on October 09, 2005 at 14:14

    Hello

    I read the data sheet of the ST7.

    What is the difference between TC bit and TDRE bit ?

    What I understood is that there is Transmit Shift Register that from it, the bits are going out straight. So if this is ''empty'' then the TC is set.

    The TDR register is written with value, and when all the data is gone to the shift register, then the TDRE bit is set, but the TC is not set yet cause transmistion from the shift register is not complete.

    Am I right ?

    Thanks

    Oren

    Visitor II
    October 10, 2005
    Posted on October 10, 2005 at 05:31

    Your are right !

    In fact the TDRE Bit tells you that the transmit buffer register ist ready to be written with a new character, no matter if the actual character transmission has been completed. The TC Bit however will only be set if the character written to SCIDR has really been sent (after transmission of the stop bit). You can use these two bits e.g. to control the transmission via RS485 - put a new character in SCIDR if TDRE ist set (or interrupt) and put RS485 transceiver back to receive mode upon TC interrupt !

    Best regards,

    Dipl.-Ing. Klaus Pelikan

    omatzaAuthor
    Visitor II
    October 10, 2005
    Posted on October 10, 2005 at 08:05

    Thanks a lot.

    Have a great day.

    Oren