??? 11/24/05 13:59 Read: times |
#104119 - More info M.I.N.E.S.T.O.N.Y. Comms :-) Responding to: ???'s previous message |
Charles Bannister said:
Hello Tony,
Can you share some more information about your Multiprocessor communications system. 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.). Question. Do you select each 89C4051 using a separate output pin from the IBM PC? What do you mean 3 I/O pins select 8 devices (74LS138)? 2. Connect all RX pins of the microcontrollers together and all TX pins together with suitable pull-ups. Question. Do the TX outputs have open collector outputs (or high impedance outputs)? How do you avoid the output of the RS232 fighting each other? 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. I can see how each 89C4051 would act as one unit although three are actually hooked up in parallel if there was another signal telling each one to awaken (at the proper time) and the TX output were open collector. Regards, Charles Bannister Hi Charles, Re: Your question #1 Each of the 4051 micros needs to have an identity, so that when the PC sends out a command via its serial RS232 port to ALL slaves, each one needs to know when it is being addressed. So that the identity for each slave does not have to be in its code, each slave will read the state of the I/O pins used for identification. For example, if we use P1.7 and P1.6 for addressing the slaves, then the 4051 which has P1.7 = 0 and P1.6=0 would be slave #1. The 4051 which has P1.7=0 and P1.6 = 1 would be slave #2 and so on....... Since we have used only 2 I/O pins of the 4051, then we can only address up to 4 slaves. If we have more than 4 slaves, then use P1.5 and an address input also. This will now allow up to 8 slaves to be addressed etc. etc. Re: Your question #2 The TX output of the 4051, (TXD), has an internal pull-up. See the 4051 specifications for maximum current which the pin can sink and select appropriate pull-up if necessary. I have used more than 9 dirivitives of the 51 and they are all similar, (but can have different current sink ability). Since each of the slaves can be uniquely addressed, then each slave 'will speak only when spoken to'. This means that there will be no conflict on the TXD. Using a more complex protocol, each slave could have the ability to initiate a response from the master. Re: Your question #3 I am not sure what you mean. Using this system all slaves are awake at the same time. They all get the same message, but within that message an identifier is sent to address ONE particular slave. It is that slave ONLY which then sends the required data back to the master. Cheers, Tony PS N.B. The RXD and the TXD pins are NOT all tied together as some may have interpreted. |