On Tue, 4 Feb 2003 08:26:39 +1300, you wrote: >Cyclic Redundancy Checks (CRCs) can also be used but are more >mathamatically intensive and are normally used for larger packet sizes = or >where a higher degree of protection is required. A simple one or two = byte >checksum is normally sufficient for short data bursts. > I've had good luck with an eight bit Fletcher's checksum (which really results in two bytes). I used this in a protocol that I use in allmost all PIC networking that I do here, described at: http://www.certsoft.com/cnp11.pdf To calculate the running checksum, the following code is called for each byte in the message (not including the checksum bytes themselves) : ; ; Calculate Checksum, rxtemp has new byte. ; docrc movf rxtemp,w addwf crca btfsc status,C incf crca movf crch,w addwf crcb btfsc status,C incf crcb return This assumes you have two bytes declared, crcb and crcb. There is a brief description of the Fletcher checksum in RF1146: http://www.cis.ohio-state.edu/cs/Services/rfc/rfc-text/rfc1146.txt -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.