> Note that there is always 1 unused byte (the one right before the one > pointed to by the input pointer). If this were used, you could not tell > the difference between a full and empty buffer. So instead of wasting the byte as unused space in the buffer, you can put that byte to good use in the header to hold the number of data bytes currently in the buffer. With that information, you don't need to waste a byte in the buffer, and knowing how much is in the buffer streamlines other operations. That's how the FIFO macros work that I pointed to earlier. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics