This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Multiprocessor comms

Hi, I am working on a project for a piece of laboratory equipment where we will have one main processor sequencing events and communicating with a PC vis RS232 and 4 sub-processors controlling temperatures, motor speeds, looading system and the like. Our intention is to use P89C668's for all the processors. My plan *was* to use RS232 between the main processor and the PC (which provides a GUI for the instrument) and I2C between the master processor and the slaves using the hardware I2C interfaces on the 668's. However I have got one of the 668's talking to some I2C IO expanders just to test the I2C routines and the performace is not that good. I have more or less copied the I2C routines from Phillips app note 10155 (http://www.semiconductors.philips.com/acrobat_download/applicationnotes/AN10155_1.pdf) The transfers work OK but at about half the speed I was hoping for. Also one of the hardware devices I tested it against seems to timeout occasionally. I haven't tried master to sleave comms yet. I think it is being slowed down by the switch statement in the I2C ISR, there is a 90-100us delay at the start of each call to the ISR which seems like a heck of a long time to me. I was wondering if anyone else had implemented something like this and if they had any suggestions. I am thinking of maybe using the UARTS for master to slave comms instead and adding a seperate memory mapped UART on the master to talk to the PC. How do you wire the UARTS for multiprocessor comms like this? What happens if you get contention on the serial lines?

TIA, John