Indeed! You need...actually it is a very good idea to use the TEMT bit to toggle the transmit enable bit on your RS-485 interface. For me, it would have been nice to have the TEMT bit generate an interrupt. My code would have been a little bit more efficient in this way. As it stands, I now look for a signal that the interrupt service routine has processed the last byte out, (THRE interrupt, and no more bytes in tx queue). After this, I poll the TEMT bit. This lets me know that I will not 'clobber' that last byte out before disabling the transmitter on my RS-485 transceiver. Ken Wada --- In lpc2000@yahoogroups.com, "Bill Knight" <BillK@t...> wrote: > Am I missing something here guys (and gals)? When the FIFO is > enabled the THRE bit in the Line Status Register is set whenever > the FIFO can accept additional characters. So if it were clear, > isn't that an indication the FIFO is full? > As for RS-485 transceiver turn-around; the TEMT bit also in the > Line Status Register, can be used to determine when the stop bit > of the last character has been transmitted. Can't that be used > to control the RS-485 interface? > > Regards > -Bill Knight > R O SoftWare & > http://www.theARMPatch.com
Message
Re: Who thinks the PC Compatible UARTs on the LPC are nice ?
2005-04-14 by Ken Wada
Attachments
- No local attachments were found for this message.