??? 11/20/05 02:18 Read: times |
#103914 - Simple RS232 multidrop Responding to: ???'s previous message |
Hi Darek,
I have used RS232 in the following way to communicate with 3 89C4051 controllers from a PC and the system works well. The controllers are about 10 metres apart and operate at 19,200 Baud. 1. Use 2 I/O pins on each controller so that its identification can be set ( of course use 3 I/O pins and select up to 8 devices etc.). 2. Connect all RX pins of the micro-controllers together and all TX pins together with suitable pull-ups. 3. Now you can treat the RX and TX as if it were 1 device and put these 2 signals through appropriate buffers so that they can be connected to the PC. Simple transistor inverters will work quite well unless going over long distances. The code for each controller can now be identical and each device will transmit only when it is addressed. If it needs to talk to the master (e.g. PC), then it can transmit 1 character when there is no activity on the RX, which can either identify the controller or merely inform the master that one of the controllers needs servicing. The protocol can be quite simple. If the data flow is not intensive then the baud rate can be greatly reduced to increase the distance between the controllers. Good luck, Tony |