Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | RS-485 w/ LPC21xx '550 UART

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

RS-485 w/ LPC21xx '550 UART - MaxStream - Ryan Bedwell - Apr 28 19:15:00 2004

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.

Regards,
Ryan





(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: RS-485 w/ LPC21xx '550 UART - Charles Manning - Apr 28 20:44:00 2004

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






(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: RS-485 w/ LPC21xx '550 UART - Peter Jakacki - Apr 28 22:17:00 2004

Charles Manning wrote:

>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. Can't help it, the answer lies in the answer. If you leave the RS-485
receiver enabled during transmission as well as the UART (the same one,
not a spare) then you can turn off the RS-485 transmit enable straight
after the last character received, simple!

Peter Jakacki




(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )