Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

485 Driver Issues (Slightly OT)

485 Driver Issues (Slightly OT)

2004-12-21 by Richard

I am driving a 485 transceiver (SN65HVD10) with the LPC2104.  The 
RE/ and DE lines are tied together and to a GPIO pin for direction 
selection.  My problem is that when I enable transmission the bus is 
driven low and a pulse is seen at my RXD input causing an 
interrupt.  I have tried disabling the UART1 interrupt before I 
toggle the direction pins of the 485 transceiver but the receive 
interrupt fires off as soon as I enable the UART interrupts again.  
Tying the direction pins of the tranceiver results in a race 
condition so I have added a small delay to let the pins settle.

Thanks for the help

Richard

Re: [lpc2000] 485 Driver Issues (Slightly OT)

2004-12-21 by onestone

If the interrupt structure is anything like other micros you need to 
disable any pending interrupt flags before re-enabling the interrupt, 
since, whatever is causing the pulse (and I assume its caused by 
switching the RS485 pins together) has caused a pulse anyway while ints 
were disabled, and this has not yet been cleared.

Al

Richard wrote:
Show quoted textHide quoted text
> 
> I am driving a 485 transceiver (SN65HVD10) with the LPC2104.  The
> RE/ and DE lines are tied together and to a GPIO pin for direction
> selection.  My problem is that when I enable transmission the bus is
> driven low and a pulse is seen at my RXD input causing an
> interrupt.  I have tried disabling the UART1 interrupt before I
> toggle the direction pins of the 485 transceiver but the receive
> interrupt fires off as soon as I enable the UART interrupts again. 
> Tying the direction pins of the tranceiver results in a race
> condition so I have added a small delay to let the pins settle.
> 
> Thanks for the help
> 
> Richard
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> <http://us.ard.yahoo.com/SIG=129j4rjba/M=295196.4901138.6071305.3001176/D=groups/S=1706554205:HM/EXP=1103679979/A=2128215/R=0/SIG=10se96mf6/*http://companion.yahoo.com>
> 
> 
> ------------------------------------------------------------------------
> Yahoo! Groups Links
> 
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/lpc2000/
>        
>     * To unsubscribe from this group, send an email to:
>       lpc2000-unsubscribe@yahoogroups.com
>       <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>. 
> 
>

Re: [lpc2000] 485 Driver Issues (Slightly OT)

2004-12-21 by Markus Meng

Hi Richard,

concerning RS485 is there a possibility to use the RTS
output pin in order to enable the driver just one
bit time before UART xmition is starting?

Markus

Richard schrieb:
Show quoted textHide quoted text
>I am driving a 485 transceiver (SN65HVD10) with the LPC2104.  The 
>RE/ and DE lines are tied together and to a GPIO pin for direction 
>selection.  My problem is that when I enable transmission the bus is 
>driven low and a pulse is seen at my RXD input causing an 
>interrupt.  I have tried disabling the UART1 interrupt before I 
>toggle the direction pins of the 485 transceiver but the receive 
>interrupt fires off as soon as I enable the UART interrupts again.  
>Tying the direction pins of the tranceiver results in a race 
>condition so I have added a small delay to let the pins settle.
>
>Thanks for the help
>
>Richard
>
>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>

Re: 485 Driver Issues (Slightly OT)

2004-12-21 by Richard

I have tried to disable the UART1 interrupt both in the UART itself 
and in the VIC.  The problem is that as soon as the interrupts ar re-
enabled it is triggered.
When the 485 driver is set the read the bus the RX pin of the 2104 
is brought low this, I believe, is detected as a start condition and 
is the first false interrupt.  
When the driver is set to read the RX line is brought high.  I 
believe this is detected as a stop condition and presents a false 
00H as having been received.

Richard


--- In lpc2000@yahoogroups.com, onestone <onestone@b...> wrote:
> If the interrupt structure is anything like other micros you need 
to 
> disable any pending interrupt flags before re-enabling the 
interrupt, 
> since, whatever is causing the pulse (and I assume its caused by 
> switching the RS485 pins together) has caused a pulse anyway while 
ints 
> were disabled, and this has not yet been cleared.
> 
> Al
> 
> Richard wrote:
> 
> > 
> > I am driving a 485 transceiver (SN65HVD10) with the LPC2104.  The
> > RE/ and DE lines are tied together and to a GPIO pin for 
direction
> > selection.  My problem is that when I enable transmission the 
bus is
> > driven low and a pulse is seen at my RXD input causing an
> > interrupt.  I have tried disabling the UART1 interrupt before I
> > toggle the direction pins of the 485 transceiver but the receive
> > interrupt fires off as soon as I enable the UART interrupts 
again. 
> > Tying the direction pins of the tranceiver results in a race
> > condition so I have added a small delay to let the pins settle.
> > 
> > Thanks for the help
> > 
> > Richard
> > 
> > 
> > 
> > 
> > 
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> > 
<http://us.ard.yahoo.com/SIG=129j4rjba/M=295196.4901138.6071305.30011
76/D=groups/S=1706554205:HM/EXP=1103679979/A=2128215/R=0/SIG=10se96mf
6/*http://companion.yahoo.com>
> > 
> > 
> > -----------------------------------------------------------------
-------
> > Yahoo! Groups Links
> > 
> >     * To visit your group on the web, go to:
> >       http://groups.yahoo.com/group/lpc2000/
> >        
> >     * To unsubscribe from this group, send an email to:
> >       lpc2000-unsubscribe@yahoogroups.com
> >       <mailto:lpc2000-unsubscribe@yahoogroups.com?
subject=Unsubscribe>
Show quoted textHide quoted text
> >        
> >     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >       Service <http://docs.yahoo.com/info/terms/>. 
> > 
> >

Re: [lpc2000] Re: 485 Driver Issues (Slightly OT)

2004-12-21 by onestone

For some reason it seems that the driver is set to idle low, whereas the 
default state for UARTS is to expect an idle high, going low on the 
start bit, and returning high after the stop bit(s). I've had a similar 
issue when using UARTs on a transceiver and had to add transistors to 
invert the signals. Sorry, can't help more than that I haven't yet 
gotten around to programming a real LPC2000 yet ;@}

Al

Richard wrote:
Show quoted textHide quoted text
> 
> I have tried to disable the UART1 interrupt both in the UART itself
> and in the VIC.  The problem is that as soon as the interrupts ar re-
> enabled it is triggered.
> When the 485 driver is set the read the bus the RX pin of the 2104
> is brought low this, I believe, is detected as a start condition and
> is the first false interrupt. 
> When the driver is set to read the RX line is brought high.  I
> believe this is detected as a stop condition and presents a false
> 00H as having been received.
> 
> Richard
> 
> 
> --- In lpc2000@yahoogroups.com, onestone <onestone@b...> wrote:
>  > If the interrupt structure is anything like other micros you need
> to
>  > disable any pending interrupt flags before re-enabling the
> interrupt,
>  > since, whatever is causing the pulse (and I assume its caused by
>  > switching the RS485 pins together) has caused a pulse anyway while
> ints
>  > were disabled, and this has not yet been cleared.
>  >
>  > Al
>  >
>  > Richard wrote:
>  >
>  > >
>  > > I am driving a 485 transceiver (SN65HVD10) with the LPC2104.  The
>  > > RE/ and DE lines are tied together and to a GPIO pin for
> direction
>  > > selection.  My problem is that when I enable transmission the
> bus is
>  > > driven low and a pulse is seen at my RXD input causing an
>  > > interrupt.  I have tried disabling the UART1 interrupt before I
>  > > toggle the direction pins of the 485 transceiver but the receive
>  > > interrupt fires off as soon as I enable the UART interrupts
> again.
>  > > Tying the direction pins of the tranceiver results in a race
>  > > condition so I have added a small delay to let the pins settle.
>  > >
>  > > Thanks for the help
>  > >
>  > > Richard
>  > >
>  > >
>  > >
>  > >
>  > >
>  > > Yahoo! Groups Sponsor
>  > > ADVERTISEMENT
>  > >
> <http://us.ard.yahoo.com/SIG=129j4rjba/M=295196.4901138.6071305.30011
> 76/D=groups/S=1706554205:HM/EXP=1103679979/A=2128215/R=0/SIG=10se96mf
> 6/*http://companion.yahoo.com>
>  > >
>  > >
>  > > -----------------------------------------------------------------
> -------
>  > > Yahoo! Groups Links
>  > >
>  > >     * To visit your group on the web, go to:
>  > >       http://groups.yahoo.com/group/lpc2000/
>  > >       
>  > >     * To unsubscribe from this group, send an email to:
>  > >       lpc2000-unsubscribe@yahoogroups.com
>  > >       <mailto:lpc2000-unsubscribe@yahoogroups.com?
> subject=Unsubscribe>
>  > >       
>  > >     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>  > >       Service <http://docs.yahoo.com/info/terms/>.
>  > >
>  > >
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> <http://us.ard.yahoo.com/SIG=12996oaub/M=295196.4901138.6071305.3001176/D=groups/S=1706554205:HM/EXP=1103737846/A=2128215/R=0/SIG=10se96mf6/*http://companion.yahoo.com>
> 
> 
> ------------------------------------------------------------------------
> Yahoo! Groups Links
> 
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/lpc2000/
>        
>     * To unsubscribe from this group, send an email to:
>       lpc2000-unsubscribe@yahoogroups.com
>       <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>. 
> 
>

Re: [lpc2000] Re: 485 Driver Issues (Slightly OT)

2004-12-22 by Peter Jakacki

Ok, I was going to take a stab at this and say it looks like you might 
just need to bias your 485 line to make sure it sees an idle condition 
when there is nothing driving the line. A quick look at the datasheet 
reveals it's covered for open circuit conditions. But the early 485 
chips would tristate the receive (uart) line when they were disabled. 
It's hard to find that in most documentation but it is in the TI doco, 
right there on page 11 where it shows the function tables.

So, when your rx is disabled your uart rx line is floating. Solution? 
Just add a pullup of course.

Hope it's that simple.

Peter




Richard wrote:

>
>I have tried to disable the UART1 interrupt both in the UART itself 
>and in the VIC.  The problem is that as soon as the interrupts ar re-
>enabled it is triggered.
>When the 485 driver is set the read the bus the RX pin of the 2104 
>is brought low this, I believe, is detected as a start condition and 
>is the first false interrupt.  
>When the driver is set to read the RX line is brought high.  I 
>believe this is detected as a stop condition and presents a false 
>00H as having been received.
>
>Richard
>



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 12/21/04

Re: 485 Driver Issues (Slightly OT)

2004-12-22 by Richard

Insert sound of hand slapping forehead.  Thank you.


Richard

--- In lpc2000@yahoogroups.com, Peter Jakacki <peterjak@t...> wrote:
> Ok, I was going to take a stab at this and say it looks like you 
might 
> just need to bias your 485 line to make sure it sees an idle 
condition 
> when there is nothing driving the line. A quick look at the 
datasheet 
> reveals it's covered for open circuit conditions. But the early 
485 
> chips would tristate the receive (uart) line when they were 
disabled. 
> It's hard to find that in most documentation but it is in the TI 
doco, 
> right there on page 11 where it shows the function tables.
> 
> So, when your rx is disabled your uart rx line is floating. 
Solution? 
> Just add a pullup of course.
> 
> Hope it's that simple.
> 
> Peter
> 
> 
> 
> 
> Richard wrote:
> 
> >
> >I have tried to disable the UART1 interrupt both in the UART 
itself 
> >and in the VIC.  The problem is that as soon as the interrupts ar 
re-
> >enabled it is triggered.
> >When the 485 driver is set the read the bus the RX pin of the 
2104 
> >is brought low this, I believe, is detected as a start condition 
and 
Show quoted textHide quoted text
> >is the first false interrupt.  
> >When the driver is set to read the RX line is brought high.  I 
> >believe this is detected as a stop condition and presents a false 
> >00H as having been received.
> >
> >Richard
> >
> 
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 12/21/04

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.