Uart temp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Uart temp

272 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mohsin on Wed Nov 17 03:52:45 MST 2010
Hi All,

             I am using LPC1114 in my project. I am using uisng UART for driving RS485 and I am controlling the Transmit enable in software.

1) I want to know how could we make use of the TEMP (Transmitter Empty)  flag. All my transmission/reception is interrupt based. As there is no interrupt for TEMP, I need to know when the Transmitter is empty (both U0THR and U0TSR are empty) so that I can disable the Transmit enable.

2) Is there a way to control so that interrupts are based only on TEMP (not on THRE).

3) Is there a way to check if there is space in the Transmit Buffer so that more characters can be written ?
            Regards,
            Mohsin
0 Kudos
Reply
1 Reply

260 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbm on Wed Nov 17 04:14:21 MST 2010

Quote: mohsin
Hi All,
I am using LPC1114 in my project. I am using uisng UART for driving RS485 and I am controlling the Transmit enable in software.


Why not in hardware? Look at RS485CTRL and RS485DLY registers.


Quote: mohsin
2) Is there a way to control so that interrupts are based only on TEMP (not on THRE).


AFAIK, not in this particular UART implementation.


Quote: mohsin
3) Is there a way to check if there is space in the Transmit Buffer so that more characters can be written ?
            Regards,
            Mohsin


THRE == 1 means that there is a place in Tx FIFO. In the interrupt routine write bytes to THR until THRE becomes 0.
0 Kudos
Reply