> I have a project that I have been prototyping using a 16x4 LCD and a > rotary > encoder where the display has to be mounted remotely from the rest of my > circuitry (consisting of a pic of course.) Right now its all breadboarded > but I need to start thinking about the user-interface pieces being > decoupled. The length of the cable will be 4-5 feet typically,maximum > being > 15 feet. My idea right now is to use a 74LS174 wired as a shift register > (4 > bit interface to the LCD), two lines (clock and data), a max232 on the pic > side driving both TX lines (clock and data). On the LCD side another > max232 > would be tied in to both rx lines of its max232 to the 74LS174, acting as > a > receiver. The same idea would be employed for the 2-bit rotary encoder, > its > two data lines would be tied into both of the TX lines of another max232 > on > the lcd side, and a max232 of course on the main board side, receiving. > > What do you guys think of this? Sound ok? Might there be a simpler way? > > Regards, > Bob > -- A one chip solution would be to put another PIC out there to drive the LCD and read the encoder. You could either run EIA485 communications (have the main unit send data and poll the remote unit, have the encoder run a counter that stores an offset that is is reset every time you send the current offset). A cheaper approach is to run "one wire open collector async." At each end of the circuit, connect the one wire to the receive pin of the PIC uart. Connect a diode from the transmit pin to the receive pin with the cathode connected to the transmit pin. Put a pull-up resistor on the main board. Either transmitter can pull the communications wire down for a space. Both ends idle in mark condition, allowing the resistor to pull the line up. Do a simple addressed packet protocol to pass data back and forth so each end can ignore data it's sending and only pay attention to data from the other end. Make it polled where the remote end responds to transmissions from the main end. That avoids any collisions. I've done this in a couple products driving remote displays and switches. Harold -- FCC Rules Updated Daily at http://www.hallikainen.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist