Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: USB ->Serial(RS485) Driver



On Oct 19, 2006, at 12:11 PM, Dean Reece wrote:

... A node's TX driver is controlled directly by a UART pin such that when the UART has bits going out it drives the bus. When it doesn't, it listens to that same bus. It handles the pre/post TX enable timing for you based solely on there being bits going out.

This means that the logical client (the presumably user-land software that's sending and receiving the bytes) must somehow "agree" with the other node(s) on the bus so they take turns transmitting. It doesn't have to be modeled as as hardware flow- control IF there is some agreement about who has the TX "token" and how it's passed logically between nodes. This is was I was referring to when I mentioned a simple request/response protocol. That makes it clear who's turn it is to TX.

Because there's only one data pair this is true even if it's just a point-to-point link between two nodes.

Yep - if the UART can automatically gate the transmitter, then that is best and doesn't require much in the way of special driver management (other than enabling this feature). Then the high-level software just avoids sending data when it isn't its turn. If the gating is manual, the driver will have to step up and handle it.

True, but that then either puts a lot of protocol knowledge in the driver or adds a lot of latency in logically managing the TX control from user land through the driver. Both nasty in my book.


I've also seen collision detection/back-off & retry protocols too, but that presumes some sort of framing at the protocol level. Fun stuff!

If your RS485 link is wired as a full-duplex point-to-point link, then your driver should probably work as-is, unless you need something extra to enable the transmitters.

I do not believe this is physically possible. RS485 is by definition a "shared pair" medium that thus must be half-duplex. RS422 is the differential analog of RS232 and has 2 data pairs. I believe that "full-duplex RS485" is a contradiction in terms even for just 2 devices.

Probably true. I mentioned it because I've seen talk of "four-wire RS-485", which is probably just RS-422, but I haven't examined it closely enough to know that it isn't some hybrid beast.

"Four-wire RS485" just makes my eyes cross. I have the same reaction when I hear "white chocolate", but that's another thread.


Also, some RS-422/485 controllers require you to bridge the Rx and Tx lines with jumpers when in 485 mode, so it is possible to have a controller in Rs-485 mode with separate Rx and Tx lines; I just don't know if such a configuration is in any way useful and distinct from RS-422.

The only utility I can imagine in having RS485 with separate Rx and Tx lines is so it could be connected to a RS422 port. (I think their differential signaling characteristics are the same.) Such a lash-up would still be half-duplex if it's 485 anywhere along the way but at least it would allow physical interoperability. But I see no benefit over RS422 since it would have to be point to point and 422 could be full duplex.


RS485's main claim to fame is that the single data channel supports a multi-drop topology as you originally noted.

Ciao!
-Mike

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden
References: 
 >USB ->Serial(RS485) Driver (From: "VAMSI" <email@hidden>)
 >Re: USB ->Serial(RS485) Driver (From: Dean Reece <email@hidden>)
 >Re: USB ->Serial(RS485) Driver (From: Michael Cashwell <email@hidden>)
 >Re: USB ->Serial(RS485) Driver (From: Dean Reece <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.