Views:
From the DS2505 data sheet (Page 10), there is a flow chart showing how to write to the device that may cause some confusion when calculating the CRC16 -- although the data sheet does spell things out fairly well with extended information within the text of the pages.  This flow chart taken by itself is missing some crucial information.  See below.  


 
What the above flow chart does not show is that the bus master receives the INVERTED CRC16 of the command, address, and data on the first pass.  In the C# program located here that writes to the DS2505, you can see the first pass being calculated by the program:
 
            // calculate crc16
            crc_array[0] = (byte) memory_command;
            crc_array[1] = TA1;
            crc_array[2] = TA2;
            crc_array[3] = bytebuffer[0];
            crc_calc = CRC16.Compute(crc_array,0x00); 
            crc_calc = ~crc_calc & 0x0000FFFF; // the CRC16.Compute() method output needs to be inverted.
 
For the subsequent passes, the CRC16 calculation is of the databyte to write SEEDED with the new address. The results, then will also need to be inverted.
 
            crc_calc = CRC16.Compute((uint)databyte, (uint)address); // CRC16 of databyte seeded to address
            crc_calc = ~crc_calc & 0x0000FFFF; // the CRC16.Compute() method output needs to be inverted.