> -------------------------------------------------- > From: "Bob Ammerman" > Sent: Friday, September 17, 2010 12:46 AM > To: "Microcontroller discussion list - Public." > Subject: Re: [EE] CRC for Maxim temp sensor DS18B20 > >>>I am trying to calculate the CRC for a DS18B20 sensor (the one used in=20 >>>the >>> temp logger project I posted about recently) >>> >> >> Check to see if your value is the bit-reversal of the correct value. In >> other words if, for example, the correct CRC is >> >> 0x12 =3D 0b00010010 >> >> Is your CRC computed as: >> >> 0x48 =3D 0b01001000 >> >> Sometimes the high-level language (or excel!) algorithm gets the bits >> flipped end-for-end relative to the hardware. > > Thanks for the reply. > I have tried all sorts of variations on the above, inverting, reversing, > swapping nibbles etc etc, but none of them work. Have you tried preloading the CRC value with all one bits? -- Bob Ammerman RAm Systems --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .