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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/07/04 09:10
Read: times


 
#68063 - RE: CRC question
Responding to: ???'s previous message
"If you want to use the 8-bit CRC, just do it and accept the consequences."


There is no choice on using the Maxim 1-wire parts, since they generate CRC8 internally.

I use this method:

<pre>
uchar crc8 (uchar crc, uchar n)
{
n ^= crc;
crc = 0;
if( n & 0x01 ) crc = 0x5E;
if( n & 0x02 ) crc ^= 0xBC;
if( n & 0x04 ) crc ^= 0x61;
if( n & 0x08 ) crc ^= 0xC2;
if( n & 0x10 ) crc ^= 0x9D;
if( n & 0x20 ) crc ^= 0x23;
if( n & 0x40 ) crc ^= 0x46;
if( n & 0x80 ) crc ^= 0x8C;
return crc;
}


Peter


List of 19 messages in thread
TopicAuthorDate
CRC question            01/01/70 00:00      
   RE: CRC question            01/01/70 00:00      
      RE: CRC question            01/01/70 00:00      
         RE: CRC question            01/01/70 00:00      
         RE: Dallas CRC            01/01/70 00:00      
         RE: CRC question            01/01/70 00:00      
   RE: CRC question            01/01/70 00:00      
   RE: CRC question            01/01/70 00:00      
      RE: CRC question            01/01/70 00:00      
         RE: CRC question            01/01/70 00:00      
            RE: CRC question            01/01/70 00:00      
               RE: CRC question            01/01/70 00:00      
                  RE: CRC question            01/01/70 00:00      
               RE: CRC question            01/01/70 00:00      
                  RE: CRC question            01/01/70 00:00      
                     RE: CRC question            01/01/70 00:00      
                        RE: CRC question            01/01/70 00:00      
                           RE: CRC question            01/01/70 00:00      
      RE: CRC question            01/01/70 00:00      

Back to Subject List