打印
[超级CRC计算器]

CRC24L_864CFB_B704CE_000000源码(www.hotcrc.com自动生成)

[复制链接]
250|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
CRC, ce, rc
/*------------------------------------------------------------------------------
   本C语言核心代码由菜农HotPower@163.com的超级CRC计算器自动生成
   Copyright 1996-2022 HotPower Software, Inc.
   菜农HotPower[url=home.php?mod=space&uid=516618]@163.com[/url] 2023年9月21日 10:03:01 于西安雁塔菜地
------------------------------------------------------------------------------*/
//CRC单表大表表格:
const unsigned long CRC24L_864CFB_Table[256] = {//特别注意Keil C51请用code替换const
  0x000000L,0x864CFBL,0x8AD50DL,0x0C99F6L,0x93E6E1L,0x15AA1AL,0x1933ECL,0x9F7F17L,
  0xA18139L,0x27CDC2L,0x2B5434L,0xAD18CFL,0x3267D8L,0xB42B23L,0xB8B2D5L,0x3EFE2EL,
  0xC54E89L,0x430272L,0x4F9B84L,0xC9D77FL,0x56A868L,0xD0E493L,0xDC7D65L,0x5A319EL,
  0x64CFB0L,0xE2834BL,0xEE1ABDL,0x685646L,0xF72951L,0x7165AAL,0x7DFC5CL,0xFBB0A7L,
  0x0CD1E9L,0x8A9D12L,0x8604E4L,0x00481FL,0x9F3708L,0x197BF3L,0x15E205L,0x93AEFEL,
  0xAD50D0L,0x2B1C2BL,0x2785DDL,0xA1C926L,0x3EB631L,0xB8FACAL,0xB4633CL,0x322FC7L,
  0xC99F60L,0x4FD39BL,0x434A6DL,0xC50696L,0x5A7981L,0xDC357AL,0xD0AC8CL,0x56E077L,
  0x681E59L,0xEE52A2L,0xE2CB54L,0x6487AFL,0xFBF8B8L,0x7DB443L,0x712DB5L,0xF7614EL,
  0x19A3D2L,0x9FEF29L,0x9376DFL,0x153A24L,0x8A4533L,0x0C09C8L,0x00903EL,0x86DCC5L,
  0xB822EBL,0x3E6E10L,0x32F7E6L,0xB4BB1DL,0x2BC40AL,0xAD88F1L,0xA11107L,0x275DFCL,
  0xDCED5BL,0x5AA1A0L,0x563856L,0xD074ADL,0x4F0BBAL,0xC94741L,0xC5DEB7L,0x43924CL,
  0x7D6C62L,0xFB2099L,0xF7B96FL,0x71F594L,0xEE8A83L,0x68C678L,0x645F8EL,0xE21375L,
  0x15723BL,0x933EC0L,0x9FA736L,0x19EBCDL,0x8694DAL,0x00D821L,0x0C41D7L,0x8A0D2CL,
  0xB4F302L,0x32BFF9L,0x3E260FL,0xB86AF4L,0x2715E3L,0xA15918L,0xADC0EEL,0x2B8C15L,
  0xD03CB2L,0x567049L,0x5AE9BFL,0xDCA544L,0x43DA53L,0xC596A8L,0xC90F5EL,0x4F43A5L,
  0x71BD8BL,0xF7F170L,0xFB6886L,0x7D247DL,0xE25B6AL,0x641791L,0x688E67L,0xEEC29CL,
  0x3347A4L,0xB50B5FL,0xB992A9L,0x3FDE52L,0xA0A145L,0x26EDBEL,0x2A7448L,0xAC38B3L,
  0x92C69DL,0x148A66L,0x181390L,0x9E5F6BL,0x01207CL,0x876C87L,0x8BF571L,0x0DB98AL,
  0xF6092DL,0x7045D6L,0x7CDC20L,0xFA90DBL,0x65EFCCL,0xE3A337L,0xEF3AC1L,0x69763AL,
  0x578814L,0xD1C4EFL,0xDD5D19L,0x5B11E2L,0xC46EF5L,0x42220EL,0x4EBBF8L,0xC8F703L,
  0x3F964DL,0xB9DAB6L,0xB54340L,0x330FBBL,0xAC70ACL,0x2A3C57L,0x26A5A1L,0xA0E95AL,
  0x9E1774L,0x185B8FL,0x14C279L,0x928E82L,0x0DF195L,0x8BBD6EL,0x872498L,0x016863L,
  0xFAD8C4L,0x7C943FL,0x700DC9L,0xF64132L,0x693E25L,0xEF72DEL,0xE3EB28L,0x65A7D3L,
  0x5B59FDL,0xDD1506L,0xD18CF0L,0x57C00BL,0xC8BF1CL,0x4EF3E7L,0x426A11L,0xC426EAL,
  0x2AE476L,0xACA88DL,0xA0317BL,0x267D80L,0xB90297L,0x3F4E6CL,0x33D79AL,0xB59B61L,
  0x8B654FL,0x0D29B4L,0x01B042L,0x87FCB9L,0x1883AEL,0x9ECF55L,0x9256A3L,0x141A58L,
  0xEFAAFFL,0x69E604L,0x657FF2L,0xE33309L,0x7C4C1EL,0xFA00E5L,0xF69913L,0x70D5E8L,
  0x4E2BC6L,0xC8673DL,0xC4FECBL,0x42B230L,0xDDCD27L,0x5B81DCL,0x57182AL,0xD154D1L,
  0x26359FL,0xA07964L,0xACE092L,0x2AAC69L,0xB5D37EL,0x339F85L,0x3F0673L,0xB94A88L,
  0x87B4A6L,0x01F85DL,0x0D61ABL,0x8B2D50L,0x145247L,0x921EBCL,0x9E874AL,0x18CBB1L,
  0xE37B16L,0x6537EDL,0x69AE1BL,0xEFE2E0L,0x709DF7L,0xF6D10CL,0xFA48FAL,0x7C0401L,
  0x42FA2FL,0xC4B6D4L,0xC82F22L,0x4E63D9L,0xD11CCEL,0x575035L,0x5BC9C3L,0xDD8538L
};
//CRC单表大表查表算法:
unsigned long GetCRC24L_864CFB_B704CE_000000_Table(unsigned char *crcBuff, unsigned int crcLen) {
unsigned int i;
unsigned long crc = 0xB704CE;//初值
  for(i = 0; i < crcLen; i ++){
    crc = (crc << 8) ^ CRC24L_864CFB_Table[(crc >> 16) ^ crcBuff[i]];
    crc &= 0xFFFFFFL;//请注意此语句为了防止数据溢出,有时可删除,具体看编译环境!
  }
  return crc;
}
int main(){
//数据格式:HEX
const unsigned char dataTable[] = {
  0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF
};//特别注意Keil C51请用code替换const
unsigned long crc;
  crc = GetCRC24L_864CFB_B704CE_000000_Table((unsigned char *)dataTable, sizeof(dataTable));
//表格函数返回crc=0xFD3BE4,与HotWC3运算相同
  while(crc | 1);//死循环,请在此处设置断点,验证函数返回值crc是否正确!!!
  return 0;
}


www.hotcrc.com主页.jpg (183.38 KB )

www.hotcrc.com主页.jpg

CRC24L_864CFB_B704CE_000000源码(www.hotcrc.com自动生成).png (386.23 KB )

CRC24L_864CFB_B704CE_000000源码(www.hotcrc.com自动生成).png

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:[url=http://www.21ic.com/tools/HotWC3_V1.23.html]

1460

主题

21619

帖子

506

粉丝