Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/24/06 16:22
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#112988 - And one more fast method
Responding to: ???'s previous message
These routines generate parity on 7-bit data returning a value ready for transmission (i.e., with the parity bit already in place).
unsigned char GenEvenParity(unsigned char b)
{
    return (b ^ (((((b ^ ((b >> 4) | (b << 4))) + 0x41) & 0x82) + 0x7E) & 0x80));
}

unsigned char GenOddParity(unsigned char b)
{
    return (b ^ (((((b ^ ((b >> 4) | (b << 4))) + 0x41) & 0x82) + 0xFE) & 0x80));
}


List of 30 messages in thread
TopicAuthorDate
odd parity problem            01/01/70 00:00      
   In Raisonance and Keil            01/01/70 00:00      
      OR            01/01/70 00:00      
         How about a portable solution?            01/01/70 00:00      
            calculating parity..            01/01/70 00:00      
            portable my ...            01/01/70 00:00      
         Or another portable solution?            01/01/70 00:00      
         And one more fast method            01/01/70 00:00      
            fast?            01/01/70 00:00      
               Yep            01/01/70 00:00      
                  Bag of Tricks            01/01/70 00:00      
                     bag of tricks..            01/01/70 00:00      
                        Good link. Thanks.            01/01/70 00:00      
                     Collecting            01/01/70 00:00      
                        ciontradictory request            01/01/70 00:00      
                           One confused puppy            01/01/70 00:00      
                              not confused            01/01/70 00:00      
                                 I/O and parity for '51 belongs in Chat            01/01/70 00:00      
                                    If memory parity were implemented, I sur            01/01/70 00:00      
                                       Memory -- expand your thinking a little            01/01/70 00:00      
                                          eeprom would be I/O            01/01/70 00:00      
                                             Memory plus software parity            01/01/70 00:00      
                                             8051 does calculate parity!            01/01/70 00:00      
                                                ALU versus I/O            01/01/70 00:00      
                  no such thought            01/01/70 00:00      
                     My two cents            01/01/70 00:00      
                        Choosing by architecture            01/01/70 00:00      
            thanks:) 18 Bytes each!            01/01/70 00:00      
               "Old" Europe            01/01/70 00:00      
   Simple method            01/01/70 00:00      

Back to Subject List