| View previous topic :: View next topic |
| Author |
Message |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Dec 28, 2007 1:35 pm |
|
|
RS232 driver chips don't usually support the tri-state output so you have to do something yourself to let multiple slaves in parallel talk to a singe master RS232 input. Often RS232 networks are daisy-chain instead of parallel for this reason. But that means one dead node kills the whole network. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
 |
gjs_rsdi
Joined: 06 Feb 2006 Posts: 476 Location: Bali
|
|
 |
RLScott
Joined: 10 Jul 2007 Posts: 465
|
|
Posted: Sat Dec 29, 2007 6:53 am |
|
|
| apl01 wrote: | | ...What do you mean by passive pull up system? |
As others have pointed out, you need to have a resistor that connects the bus to +Vcc so that the bus does not float randomly when nothing is being transmitted.
| Quote: | I was thinking of making both master and slaves always in the receiving state by making the Tx pins as inputs i.e input(Tx). When the slave or master wants to send data the Tx pin becomes active sends data then resorts back to an input. Being new to comms would this work?
|
I don't know. For this to work you would need to force the Tx pin to an input. TRIS settings may not be enough to do this. There are cases where the enabling of a peripheral overrides the TRIS settings. Looking at one of the PIC datasheets, I see only the SPEN bit being used to set the input/output state of the Tx pin. The TXEN bit does not seem to be involved in the input vs. output decision. It may be that you would have to disable the entire serial port (Tx and Rx) to force Tx to be an input, which would, of course, defeat the purpose. In any case, it might be safer not to depend on this ability. Instead, use an external transisitor to convert the Tx output into an open collector/drain. If you do this in the most straightforward way, it will result in a logic inversion. Therefore you should include another inverter so that the idle state on the Tx pin (which is high) corresponds to the transisitor being in the "off" state.
Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
 |
|