Hi Paulsky,
I use a serial bus very similar to the four-wire RS485 version of Modbus.
Some differences between my protocol and Modbus are:
Whereas Modbus typically uses 19.2 KBaud, I use 500 KBaud. (Modbus was not fast enough).
Whereas the Modbus can go idle, in my implementation the bus never goes idle.
Whereas Modbus uses CRC16, I use a longitudinal-check character for forward-error-correction.
In one of our systems, each node gets a new packet every 3 milliseconds. At the same time, each node needs to do some math and control a servo-motor, as well as other minor background tasks. So I can safely say that any of the 08s should be able to handle Modbus.
To implement it, I did the following:
I used the sleep/wake-up feature of the SCI to ignore packets destined for other nodes.
I used the idle-line interrupt feature to detect the end of each packet.
I only buffer the received characters in the ISR. I parsed the entire message separately.
No single ISR takes more than 5 microseconds to execute (I have a lot of ISRs).
Now, I only program in assembly language, so I can't say for sure what will happen in C. But I'm running at a speed 25 times faster than the Modbus default speed, and 4 times faster than 115 KBaud. I would hope that CodeWarrior would not affect performance THAT much.
If you would like some code examples, let me know (assembly language, of course).