On Wed, 6 Dec 2000, William wrote: > Hi, all piclisters. > > How to write a even parity checking algorithm? > My data will be 7-bit (LSB) for ASCII data, and the > 8th bit will reserse for even-parity bit checking. Here's a variation of Payson's (with the same verbose comments) bcf byte_to_send,7 swapf byte_to_send,w xorwf byte_to_send,w movwf t rlf t,f rlf t,f xorwf t,f rlf t,w xorwf t,w andlw 0x80 iorwf byte_to_send,w ; use xor for odd parity Scott -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.