|
![]() Oscillators/PCA/Timers/SMBus/UART/SPI
![]() Multi-processor mode
|
| next newest topic | next oldest topic |
| Author | Topic: Multi-processor mode |
|
AVP New Member |
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 |
how are they connected? IIC, RS485, SPI ???? Erik IP: Logged |
|
AVP New Member |
Am using UART in Mode3 -AVP IP: Logged |
|
andyc Member |
Can you post more info about the electrical setup (ie transciever chips, terminating resisistors if any ect) Andy IP: Logged |
|
worknhard9062 Member |
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. 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: 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. ------------------ IP: Logged |
|
AVP New Member |
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. IP: Logged |
|
erikm Member |
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 |
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 |
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 |
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 |
hello, Has anyone tried connecting 9 or more 8051 s Pl reply IP: Logged |
|
erikm Member |
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 |
![]() |
|
Have you seen our MCU Knowledge Base?