Searching \ for 'Parity Calculation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=parity+calculation
Search entire site for: 'Parity Calculation'.

Truncated match.
PICList Thread
'Parity Calculation'
1999\01\19@180657 by Anthony Buckwell

flavicon
face
Hi all

I need to calculate odd Parity on a Packet of the following

Packet = 6 words, the 6th is the parity byte.

We will take BITn from each WORD then calculate odd parity.

Ive almost completed a working version of code but im sure im doing it a
long winded way.

Are there any nice PARITY routines out there.

thanks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Anthony Buckwell                        E-Mail: spam_OUTa.buckwellTakeThisOuTspamcat.csiro.au
Electronic Engineer
Exploration and Mining, QCAT
CSIRO Australia

2643 Moggill Road, Pinjarra Hills QLD 4069
PO Box 883 Kenmore QLD , 4069 Australia
PH: +61 7 3212 4769     Mobile 0419 783 109
FAX:+61 7 3212 4455
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

1999\01\19@183225 by Regulus Berdin

picon face
Hi,

Try:
       movf    byte1,w
       xorwf   byte2,w
       xorwf   byte3,w
       xorwf   byte4,w
       xorwf   byte5,w
       movwf   byte6           ;store parity

Reggie


Anthony Buckwell wrote:
{Quote hidden}

1999\01\19@192414 by Gerhard Fiedler

picon face
At 07:34 01/20/99 +0800, Regulus Berdin wrote:
>Try:
>        movf    byte1,w
>        xorwf   byte2,w
>        xorwf   byte3,w
>        xorwf   byte4,w
>        xorwf   byte5,w
>        movwf   byte6           ;store parity
>
>Reggie
>
>
>Anthony Buckwell wrote:
>>
>> I need to calculate odd Parity on a Packet of the following
>>
>> Packet = 6 words, the 6th is the parity byte.
>>
>> We will take BITn from each WORD then calculate odd parity.

isn't that even parity? load w with 0xff before you start xoring (or xor it
with 0xff afterwards) to get it odd.

ge

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...