What if you need to communicate two microcontrollers like this models which has no predefined serial communication support like I2C or RS232? Or what if you need extra serial communication points as your current ones are busy & already being used?
I tried programming a time divisioning and cycle counting protocol for two PIC16F84A's. For the each code you predefine, you give a different period of logic signal. Like: For code#1 , 5 miliseconds, #2, 10 miliseconds, etc etc... Then other pics starts counting within a period of (for example:) 100 microseconds, this means, when that 5 miliseconds start, pic will divide that 5 miliseconds to 100 microseconds, and will have a number counter and it will be kept in registers, for example, while doing this, in my example, for 5 ms switching (transmitting pic), 100 microseconds counted 45 times, i defined a number between 35 and 55, which will be the equivalent of 5 ms predefined code in receiving pic, i define 10 numbers back and forward as extra, to protect communication from errors, you can use higher frequency clock signals for pics up to their limits told in datasheets, and use lower time periods down to minimum of one step operating time of microcontroller at that point to be able to send more codes and recieve, also can change programme based on this to have a continous communication. It's up to your algorithm.
Here is the link to the package of my example containing Proteus ISIS design and simulation, Picbasic, hex, asm files of program
http://rapidshare.com/files/30364431/yeni_seri_protokol.zip.html
and here is the video of the example posted on youtube
http://www.youtube.com/watch?v=MTlymy2PYIs