SDAA287 March   2026 ADS112C04 , ADS112U04 , ADS114S06 , ADS114S08 , ADS122C04 , ADS122U04 , ADS124S06 , ADS124S08 , ADS125H01 , ADS125H02 , ADS1260 , ADS1261 , ADS1262 , ADS1263 , ADS127L01 , ADS127L11 , ADS127L14 , ADS127L18 , ADS127L21 , ADS131A02 , ADS131A04 , ADS131M02 , ADS131M02-Q1 , ADS131M03 , ADS131M03-Q1 , ADS131M04 , ADS131M04-Q1 , ADS131M06 , ADS131M06-Q1 , ADS131M08 , ADS131M08-Q1 , ADS7028 , ADS7038 , ADS7066 , ADS7067 , ADS7128 , ADS7138 , AFE78101 , AFE781H1 , AFE78201 , AFE782H1 , AFE88101 , AFE881H1 , AFE88201 , AFE882H1 , DAC60504 , DAC60508 , DAC61401 , DAC61402 , DAC61404 , DAC61408 , DAC61416 , DAC70504 , DAC70508 , DAC71408 , DAC71416 , DAC7750 , DAC7760 , DAC80504 , DAC80508 , DAC81401 , DAC81402 , DAC81404 , DAC81408 , DAC81416 , DAC8741H , DAC8742H , DAC8750 , DAC8760 , DAC8771 , DAC8775 , HDC3020 , HDC3020-Q1 , HDC3021 , HDC3021-Q1 , HDC3022 , HDC3022-Q1 , LMP90077 , LMP90078 , LMP90079 , LMP90080 , LMP90097 , LMP90098 , LMP90099 , LMP90100 , TMAG5173-Q1 , TMP114 , TMP126 , TMP126-Q1 , TMP1826 , TMP1827

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Browser Based CRC Calculator Example
    1. 2.1 CRC-8-CCITT, 0x00 Initial Value
    2. 2.2 CRC-8-CCITT, 0xFF Initial Value
    3. 2.3 CRC-8-One-Wire, 0xFF Initial Value
    4. 2.4 CRC-16-CCITT, 0xFFFF Initial Value
    5. 2.5 Input and Output Data Reflection
  6. 3Summary
  7. 4References

CRC-8-CCITT, 0xFF Initial Value

The example CRC code can be changed to calculate other CRC types. For other 8-bit CRC calculations, check the initial value and the CRC polynomial.

In different CRC versions, the initial value is set as either 0x00 or 0xFF. To alter the code to check for the same polynomial, but using 0xFF as the initial value, change the value of let crc in the second line of the function. The function is renamed to crc8CCITTOnes() to show a different initial value. Figure 2-6 shows the code with a new initial value of 0xFF.

 CRC-8-CCITT, Initial Value 0xFF, Calculation Function Figure 2-6 CRC-8-CCITT, Initial Value 0xFF, Calculation Function

In the body section of the html, make sure that the description is changed to reflect the new initial value of 0xFF. This new CRC-8-CCITTOnes() function with 0xFF initial value is also updated at the end of the calculateCRC() function.

Table 2-5 lists the new CRC-8-CCITTOnes() with a list of TI devices that use this CRC algorithm. The last column provides the calculation for ABC123 to check your code.

Table 2-3 CRC-8-CCITT, Initial Value 0xFF
CRC Polynomial Initial Value Devices CRC for 0xABC123
CRC-8-CCITT x8 + x2 + x + 1 (0x07) 0xFF ADS1261, ADS127L11, ADS127L14, ADS127L18, ADS127L21, ADS7066, ADS7067, TMAG5173-Q1, TMP114 0x9E

After making changes to the JavaScript, run the CRC-8-CCITT 0xFF initial value code. Figure 2-7 shows the new result for the CRC.

 CRC Result for 0xABC123, CRC-8-CCITT, Initial Value 0xFF Figure 2-7 CRC Result for 0xABC123, CRC-8-CCITT, Initial Value 0xFF