I've done a lot of packet stuff using RF over IR and also half duplex uart over a single wire or rs485. The packets generally take this form 0xaa 0x55 - two byte start of packet identifier 0xnn - one byte packet type 0xnn - one data length xxxx - variable length data Checksum or CRC Sometimes I put a source and destination address after the 0xaa 0x55. On the IR system, I'm sending closed captions in movie theaters. On the transmit and receive side, I use a union of structures for different packet types. The received data is put in the buffer on a byte by byte basis. If the CRC is good, the data packet type determines which structure to use in sorting out the data. The reverse process is used in forming the packets. This is a one way system. On two way systems, I use a master polling slave units. The slave always responds to the master and never transmits otherwise. So, there's no contention. In each case, the receiver uses a state machine to keep track of where it is. It waits for the first 0xaa, then waits for the 0x55, then gets the packet type, the length, then knows how many more bytes to get until the checksum or CRC is coming in. Good luck! Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! Not sent from an iPhone. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .