> I am interpreting this as a 5 unit multi-drop network. > One unit will be master and the other three will be slaves. > One simple approach would be to select 5V as the marking ( idling > condition ) > and zero volts as the space ( start ) condition. > All of the units shall tri-state their output or the output can be > open-collector. > In either case you will want a pull-up resistor to 5 V. > The master queries one of the 4 slaves and then waits for an answer. > The master can send a break condition to reset the network. > > The devil is in the details, however. this answer will provoke more > questions than > it answers. Victor, your response will determine what the details > will be. > > Gus I've done a couple systems like this. One is for communication between two PICs in a dental curing light. This was the "open collector" bus, as described above. To get the "open collector" transmit output from the PIC UART, I just put a diode from the output pin to the bus with the cathode of the diode at the outpt pin. Any transmitter on the bus can pull the bus low. The pull-up resistor pulls the bus high. All receiver inputs are on the bus. A master polls the other devices. I used a simple packet format that included a start of packet sequence (like 0xaa55), a TO address, a FROM address, a packet type, a data count, the data, and a checksum. In another system (battery monitor for electric car), each PIC was across a battery in a large series string (something like 180VDC). Here, the PIC sends a short packet to the LED of an opto isolator. The opto has a phototransistor. We run a two wire open collector bus between all these phototransistors on the optos. The master unit has a pull-up resistor and receives data off the bus. This is a one way system with no anti-collision method. We get collissions now and then, but these cause the checksum to fail, so the packet is thrown out. The system does not require every packet to be received. The fact that the packets are very short and are not sent very frequently keeps the number of collisions to a minimum. Good luck! 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