Can I have two peripherals connected in the same serial port?

Discussion in 'Wireless & RF Design' started by jkcobain, Mar 22, 2016.

  1. jkcobain

    Thread Starter Member

    Jun 8, 2014
    31
    5
    I'm developing a project where I need to communicate with a scale and with a PIC at the same time. My software sends signals to the PIC depending on the scale's value. I thought that it would be possible because I send a char ('P') to the scale, and I get the current value, then I would send a char (other than P), to give an instruction to the PIC. But I'm simulating in proteus, and the serial port stops working when I connect two pics at the same time (I put a diode in the Tx pin).

    Is that possible? if it is, how can I do it?

    Thank you in advance!
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    A serial port is a full-duplex point to point connection. It is possible to make this a multi-drop connection if you use RS-485 transceivers, but then you have to shift to a half-duplex scheme. To do a half-duplex scheme you have to figure how to enforce the discipline that only one transmitter can be active at a time.
     
    jkcobain likes this.
  3. jkcobain

    Thread Starter Member

    Jun 8, 2014
    31
    5
    Thank you very much! I didn't even know RS485 existed. I have a lot to investigate now!
     
Loading...