On Thursday 29 April 2004 12:15, MaxStream - Ryan Bedwell wrote: > Folks, > > Anyone out there who's figured out how to properly time the de-assertion > of the 485 driver enable when using the LPC21xx UART? Problem is, the > driver needs to be tristated as quickly as possible after transmission > of the last byte (perhaps during the stop bit would be ok?), but the > LPC21xx UART doesn't really give you an indication of this. I'm > sniffing down some rather obscure approaches (i.e. perhaps exploiting > the published THRE interrupt initialization conditions), but wanted to > see if anyone has already solved the issue. You really want to be using TEMT as the indicator (ie the holding and shift registers are empty). THRE just tells you that the holding resgister is empty [plus sone small print], there may still be data in the shift register. Since the device is supposed to be 16550 compliant, I'd expect the solution to be well known and available. Perhaps, if you have a spare timer, you could time a short period after the THRE interrupt. Perhaps, if you have a spare UART, you could pipe the one UART back into the other. When you see the rx on the second UART you know you're done with the tx on the first. -- CHarles
Message
Re: [lpc2000] RS-485 w/ LPC21xx '550 UART
2004-04-29 by Charles Manning
Attachments
- No local attachments were found for this message.