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

Thread Starter

jkcobain

Joined Jun 8, 2014
40
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!
 

Papabravo

Joined Feb 24, 2006
21,225
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.
 

Thread Starter

jkcobain

Joined Jun 8, 2014
40
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.
Thank you very much! I didn't even know RS485 existed. I have a lot to investigate now!
 
Top