At 21:01 8/07/99 -0700, you wrote: >what you are trying to do could get a bit messy. > >On Thu, 8 Jul 1999, John Esposito wrote: > >> Question: >> >> I am trying to implement RS485 using a Maxim 3082 (half duplex) and a PIC. I >> want to conserve PIC I/O pins (don't we all??); is this layout acceptable? >> >> PIC RB0 - controls TX/RX mode; tied directly to MAX ~RE (rx enable not) and MAX >> DE (tx driver enable) >> PIC RB1 - bi-directional input; tied directly to MAX RO (rx output) and MAX DI >> (tx input) >> >> When RB0 is low (receiving), RO splits its output between DI (which is in don't >> care state) and RB1 >> When RB0 is high (trans), RB1 splits its output between DI and RO (which is in >> High-Z) >> >> Is this acceptable? Is any other hardware (resistors, etc) necessary? Assuming >> I allow for propagation delays, all should be well, right?? >> >> Any comments are greatly appreciated. >> >> >> Regards, >> >> --John >> > > Yes this could be a bit messey in that the chip you want to use is full duplex. There will be some small amounts of backdrivig when changing from TX to RX and Vice versa. But most of this will be on the RS485 line, thus you may get some small glitches when chanigng state, unless you force an idle state at both ends before attempting to start a transmit cycle. To avoild contention at the PIC on the data line, when changing from Transmit to receive mode, set it to an input, then change the enable line to the RS485 driver, also you will need to pull this data line (On the PIC side) to the idle state so that during this process you will not cause crap to go out (Resistor required). When going from RX to TX ,set the data line to an output first (An place in the idle state) then change the driver enable. The small contention time can be lived with, if you want a resistor say 1k can be in series to reduce the current flow at this point in time. Repeat the same process on the other end. Dont forget to terminate at 100-120R on the 485 side. You may also need to bias the lines so that the idle state is guarenteed at all times when nothing is connected etc. Dennis