cancel
Showing results for 
Search instead for 
Did you mean: 

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

omatza
Associate II
Posted on October 10, 2005 at 08:05

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

3 REPLIES 3
omatza
Associate II
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

andreasfiebich9
Associate II
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

omatza
Associate II
Posted on October 10, 2005 at 08:05

Thanks a lot.

Have a great day.

Oren