BrianT made a great Protocol! i have a project that could use this idea!
It depends in wheter you will use several or just one Slave, if you will use several you would have to make a Data Path Access Control (to avoid collision), this is what BrianT made with the Attention pin. If on the other hand your are using just one slave you can do so many things!! I have even done it with Serout and Serin Commands! But i will definitively recommend you using serial port and interrupts.
A nice protocol for communication is used in one of Microchips AppNotes, the one with the Serial Bootloader for 18F and 16F devices (dont remember the number right now, easy to find on their webpage), in that protocol you can find that they try to connect a uC with a PC in both ways, it uses CRC and even an autobaud function. Pay attention to the packet they form it is simple just 4 or 5 extrabytes.
From my point of view if you really have a "Master" the master can and should control all the communication, slave should just answer to the Masters Request, otherwise it could get tricky (or just trickier).
The simplest form i have used before was just sending 1byte data from Master to Slave, there you can have 255 orders

, but you can get in trouble if the byte gets messed up and the slave ends up receiving garbage.
Whats i think is better is for you to give us one of your ideas, that way we can tell you pros and cons we find on it.
Bookmarks