You could always reserve another character (say 254) as an escape character, and then esc/255 means you are sending 255 instead of start of packet, and esc/esc means you are sending the value of the escape character. At which point you should seriously think about using the "async HDLC" standard (as used by PPP, in the IP world.) There are uart chips that support the asynchdlc protocol in hardware, not to mention loads and loads of existing software. You need not include all the heavy-weight PPP options and negotiations just to use the async HDLC packet format. BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads