Flag uart THRE e TEMT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Flag uart THRE e TEMT

1,037件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iig3998 on Sat Feb 08 10:22:37 MST 2014
Hi all,

i am a beginner and i use the lpc1114. I want send with uart the chars. I don't want use the interrupt to send the chars. I don't use the FIFO TX. With the software polling 2 flag of register U0LSR: THRE e TEMT.
I read the user manual but I don't understand what indicate.

What are?

What differences are there between the two?

Thanks.
ラベル(1)
0 件の賞賛
返信
1 返信

974件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by embd02161991 on Thu Feb 13 03:42:08 MST 2014
Hi,

The THR indicates the Transmitter Holding Register. It contains the next character to be transmitted. The TSR is a Transmitter Shift Register, which is a shadow register and reads from THR  and is assembled to be transmitted via the physical interface. The THRE bit is set, when the THR register is empty. The TEMT bit is set when both the THR and TSR is empty. There could be a situation where the THR is empty but the TSR isn't . In which case , data is present in the shift register to be transmitted . This helps to identify the status of the UART interface.

Thanks,
NXP Technical Support
0 件の賞賛
返信