Sorting data coming in from the serial port

You can get ideas from Robin's Serial Input Basics - updated. The principles apply to communication between two microcontrollers as well; you will have to write the sender side yourself matching the receiver.