pic microcontroller discussion list <> wrote: > I have two rs232 connections and I would like to send/receive from > both of them, *not* at the same time. Can I connect the two of them > to the same RX/TX line and somehow select comm1 and comm2 from the > pic? You can put each TTL level comms line into one input of an OR gate, with the other input of each OR gate going to separate PIC pins. Feed the two outputs of the OR gates into an AND, the output of the AND goes into the PIC USART pin. If either of the control lines is low, that port's data will pass through to the PIC. (TTL level serial comms idles high) That's the basic idea, you could reduce it to one control pin from the PIC without much extra logic Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk This e-mail and any files transmitted with it ("E-mail") is intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the addressee(s), any disclosure, reproduction, copying, distribution or other use of the E-mail is prohibited. If you have received this E-mail in error, please delete it and notify the sender immediately via our switchboard or return e-mail. Neither the company nor any individual sending this E-mail accepts any liability in respect of the content (including errors and omissions) and timeliness of the E-mail which arise as a result of transmission. If verification is required, please request a hard copy version -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics