I'm a newbie ...
my application requires 2 MCU units, I want to connect them together,
I thought about using SPI to interface between them, as SCI is for remote CPU's ?
please correct me if I 'm wrong
To clarify one point - both SCI modules must never simultaneously be in master mode - only one at a time. If the SS input should ever become active whilst the SPI module is in master mode, a mode fault will occur. For a multi-master situation, I would also recommend the inclusion of small current limiting resistors, maybe 470R, in case a conflict should ever occur.
Depending of the series resistor value , this might reduce the maximum clock rate, but normally you might use the highest clock rate available for fastest data transfer.
Hello, and welcome to the forum.
If the two MCUs are within the same equipment, the use of the SPI module would be a good choice. This will potentially operate at a higher speed than the SCI module. You could also use IIC (I2C), but this is more complex to use, and relatively slow.
To keep the operation simple, you would need to allocate one MCU as the master, and the other MCU as the slave. Depending on the data transfer requirement, you may need to allow for an additional "handshake" interconnection, so that the slave can signal the master that it has data to send.
Another possible arrangement is for each MCU to default to slave mode, and to become a master only when it needs to send data. You might still require the additional handshake to prevent a conflict should both MCUs simultaneously attempt to become masters.
thank you v. much for your reply, it's highly appreciated & v. useful
I think I'll go for the arrangement of which both can be masters simultaneous, as each will need at an instant to initiate the transfer
but I wonder what would be the best baud rate & baud rate divisor if the both MCU's are MC9S12XEP100?
Thank you v. much for your help
thanks Mac v. much, ur help is highly appreciated
thanks VickLiui for ur reply,but I found CAN v. hard as a newbie!!
i think the CAN bus will be a good choice if the distance of the two chip is very close. 1Mbps , 29bits ID , 8Byte package.
Retrieving data ...