| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Oct 19, 2006, at 11:22 AM, Dean Reece wrote:RS232 is full-duplex (independent Tx and Rx lines) and is used for point-to-point connections. RS485 commonly uses a shared data line and multi-drop topologies. To support this, there must be a mechanism at the driver level to gate the transmitter for each node, and a protocol to select which node can transmit at any given time.
The IOSerialDriverSync & related classes assume a full-duplex point-to-point communication channel, and don't have any built-in capabilities regarding line turnaround. You should in theory be able to implement this control protocol in your driver, such that the superclasses don't need to know or care about the line control (when it isn't your turn to talk, act as if you are flow- controlled off).
This is what I've seen. 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.
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.
Cheers, - Dean _______________________________________________ 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
| 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>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.