Hi Phillip, HDLC (or some variation thereof) has well and truly stood the test of time it is very easy to implement, efficient, and most importantly well understood. Many protocols base themselves on HDLC particularly its framing structure. If your product is fairly specific you'll probably just want to use the HDLC framing rules and your own protocol for the actual data. An HDLC frame looks like this :- FLAG ADDRESS Payload CRC FLAG (8bits) (0-16Bits) (8 * N Bits) (16 Bits) (8Bits) Basic rules:- The flag is a fixed byte (often 0b01111110 or 0x7E) The flag must be escaped if it appears in the data stream. Have a search around the web for more details.. Unless you're really tight on time or program space I'lld say go with the CRC (it's VERY easy to implement) over a simple checksum. Regards, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mike Cornelius Internet: mike@bytethis.com.au Byte This Interactive Phone: +61 2 9310-2157 PO Box 1342 Strawberry Hills FAX: +61 2 9319-3948 NSW 2012 Australia URL: http://www.bytethis.com.au ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Philip Addicott Sent: Friday, 25 August 2000 3:21 PM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: Protocols for Serial Communications I have been working towards a stable serial link with a PC. I am not sending a lot of data, things like date,time stamps plus the odd 6 or 8 byte codes. However it has become pretty clear that good serial coms has a lot more to it than banning bits in and out of a PIC, bits DO go missing or get corrupted. It also seems that the pins for hardware handshaking are never used so there must be protocols involved, so here are my questions. Is there a standard protocol or at least a guideline that one could work from? Do I need to use CRC or is a xor check sum ok? Thanking you in advance. Philip -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu