Oscillators/PCA/Timers/SMBus/UART/SPI
  Multi-processor mode

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Multi-processor mode
AVP
New Member
posted April 29, 2004 03:02 PM     Click Here to See the Profile for AVP     Edit/Delete Message
Hi,
I have two F350s serving as slaves and one F124 which serves as a Master. F350s respond to requests send by the Master. This setup is running fine. Now, when I am trying to add a 3rd slave ie 3rd F350, my system stops working. The moment I remove the 3rd slave from the setup... again the system starts working properly. I have made the whole circuit on a bread board. I tried putting a pullup on the TX pins of the F350 but it makes no difference. Any ideas ?
thanks
AVP

IP: Logged

erikm
Member
posted April 30, 2004 04:36 AM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
how are they connected? IIC, RS485, SPI ????

Erik

IP: Logged

AVP
New Member
posted April 30, 2004 08:09 AM     Click Here to See the Profile for AVP     Edit/Delete Message
Am using UART in Mode3
-AVP

IP: Logged

andyc
Member
posted April 30, 2004 08:41 AM     Click Here to See the Profile for andyc   Click Here to Email andyc     Edit/Delete Message
Can you post more info about the electrical setup (ie transciever chips, terminating resisistors if any ect)
Andy

IP: Logged

worknhard9062
Member
posted April 30, 2004 08:56 AM     Click Here to See the Profile for worknhard9062   Click Here to Email worknhard9062     Edit/Delete Message
Maybe a little communication gap here - and some poor/ misleading Cygnal documentation.

First off, UART mode 3 is a configuration of the peripheral hardware, NOT the means by which you connect multiple processors. What I mean is this: IIC (SMBus), SPI, UART RS485 - these are means to connect things.
Mode 3, 9600 baud, 100KHz are the modes of operation of the things you use to connect things.

But with that nit-pickiness aside, you've answered the question. You are using the UART in multiprocessor mode. I'm presuming at this point since you didn't mention RS485 that you are connecting the CPU's together per the Cygnal documentation, which (in my opinion) misleadingly indicates that you can directly connect the Tx pins on ALL slaves together. I don't think so. You really need some sort of tri-stateable interface device, such as an RS485 transceiver.

That being the presumption, I'm not surprised that two slaves work but three do not. The Tx lines are fighting each other. These are NOT open collector devices and therefore cannot be directly connected together, even though the documentation suggests they can.

I think that may be your problem. Some other things to consider to troubleshoot situations like this - in general:
1. If it works with 2 but not with 3, what changes? Have you looked at any signals using a scope? Don't have a scope? If you're a hobbyist you're probably on a strict budget and can't afford one (even though good prices on used equipment can be had via ebay and the like). If you're an employee then convince your boss you need some tools. Had you looked at the Tx line you would have likely noticed some degradation in the signal levels.

2. What about software? Just because it works with 2 doesn't mean it works with 3, or 10. Timing problems can make something appear to work under limited conditions. All you said was that the system stopped working. Not much for us to go on. Did the master continue to transmit but not receive any reply? Was the reply garbled? Did the CPU's lock up? Did multiple slaves attempt to respond at the same time, causing data collisions? You see what I mean? There are many more questions you can ask. The symptoms help define where you need to look next.
Hope that's helped.

------------------
Regards,
Steve C.

IP: Logged

AVP
New Member
posted April 30, 2004 09:22 AM     Click Here to See the Profile for AVP     Edit/Delete Message
Thanks Erik, Andy and Steve.
Steve you guessed it right. I am connecting all micro-controllers directly to each other using the UART(RX and TX pins). As it worked for two slaves. I assumed it would work for more.
I shorted all the TX pins of the slave devices to each other and then connected them to the RX of the Master. similarly, just shorted all the RX pins of the slave devices and connected it to the TX of the Master. Initially I didn't put any terminating resistor or pullup. Still it worked fine for two slaves and one Master.

When I searched this section of the forum I found two matches for the string "multi processor". The first one mentions about taking the pin TX in Tristate mode. So someone has suggested configuring the TX pin in open-drain config and using an external pullup. I tried that also but still the same problem. Now will try the second option suggested there that is to change the port configuration dynamically.
Please let me know if you find anything erroneous in my above statements ! or let me know if you come up with any other suggestions.
Thanks again.
regards
Ashish

IP: Logged

erikm
Member
posted April 30, 2004 09:43 AM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
You MUST configure the Slave Tx as open collector with pullup (internal or external). This may limit your max comm speed. If you configure (as Config does) as Push-pull you will start blowing smoke/chips. If your derivative can not be changed this way, you need RS-485 transcievers.

Erik

IP: Logged

AVP
New Member
posted April 30, 2004 10:33 AM     Click Here to See the Profile for AVP     Edit/Delete Message
Hello Steve, erik and Andy,
I again tried using an external pullup with the TX configured in open-drain and it worked for three slaves. Maybe last time I had some connection wrong on my messy bread board. So Steve, I guess it might still work without using a driver such as RS485. I will be adding the remaining 8 slave boards and will let you guys know how it works. Thanks a lot guys !

IP: Logged

erikm
Member
posted April 30, 2004 10:59 AM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
I guess it might still work without using a driver such as RS485.
IF they are all on the same board. If not you will be playing with fire.

Erik

IP: Logged

AVP
New Member
posted May 26, 2004 09:30 AM     Click Here to See the Profile for AVP     Edit/Delete Message
Hello all,
I tested my system for 1 Master and 9 slaves and it's working fine. I was using a small PCB for each of the slaves and was wiring them up. Now will transfer the whole design to a single 4 layer PCB (as am using a 24-bit ADC for each channel am gonna have to design the layout carefully ... right ? ). Hope it comes out well. thanks again everybody.
regards
Ashish

IP: Logged

ravirke
New Member
posted September 02, 2010 07:36 AM     Click Here to See the Profile for ravirke   Click Here to Email ravirke     Edit/Delete Message
hello,

Has anyone tried connecting 9 or more 8051 s
in multiprocessor mode?

Pl reply

IP: Logged

erikm
Member
posted September 02, 2010 08:21 AM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
yes with RS 485

[This message has been edited by erikm (edited September 02, 2010).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b