打印
[超级CRC计算器]

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

[复制链接]
169|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
/*------------------------------------------------------------------------------
   本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:08:24 于西安雁塔菜地
------------------------------------------------------------------------------*/
//CRC单表大表表格:
const unsigned long CRC24R_DA6000_Table[256] = {//特别注意Keil C51请用code替换const
  0x000000L,0x01B4C0L,0x036980L,0x02DD40L,0x06D300L,0x0767C0L,0x05BA80L,0x040E40L,
  0x0DA600L,0x0C12C0L,0x0ECF80L,0x0F7B40L,0x0B7500L,0x0AC1C0L,0x081C80L,0x09A840L,
  0x1B4C00L,0x1AF8C0L,0x182580L,0x199140L,0x1D9F00L,0x1C2BC0L,0x1EF680L,0x1F4240L,
  0x16EA00L,0x175EC0L,0x158380L,0x143740L,0x103900L,0x118DC0L,0x135080L,0x12E440L,
  0x369800L,0x372CC0L,0x35F180L,0x344540L,0x304B00L,0x31FFC0L,0x332280L,0x329640L,
  0x3B3E00L,0x3A8AC0L,0x385780L,0x39E340L,0x3DED00L,0x3C59C0L,0x3E8480L,0x3F3040L,
  0x2DD400L,0x2C60C0L,0x2EBD80L,0x2F0940L,0x2B0700L,0x2AB3C0L,0x286E80L,0x29DA40L,
  0x207200L,0x21C6C0L,0x231B80L,0x22AF40L,0x26A100L,0x2715C0L,0x25C880L,0x247C40L,
  0x6D3000L,0x6C84C0L,0x6E5980L,0x6FED40L,0x6BE300L,0x6A57C0L,0x688A80L,0x693E40L,
  0x609600L,0x6122C0L,0x63FF80L,0x624B40L,0x664500L,0x67F1C0L,0x652C80L,0x649840L,
  0x767C00L,0x77C8C0L,0x751580L,0x74A140L,0x70AF00L,0x711BC0L,0x73C680L,0x727240L,
  0x7BDA00L,0x7A6EC0L,0x78B380L,0x790740L,0x7D0900L,0x7CBDC0L,0x7E6080L,0x7FD440L,
  0x5BA800L,0x5A1CC0L,0x58C180L,0x597540L,0x5D7B00L,0x5CCFC0L,0x5E1280L,0x5FA640L,
  0x560E00L,0x57BAC0L,0x556780L,0x54D340L,0x50DD00L,0x5169C0L,0x53B480L,0x520040L,
  0x40E400L,0x4150C0L,0x438D80L,0x423940L,0x463700L,0x4783C0L,0x455E80L,0x44EA40L,
  0x4D4200L,0x4CF6C0L,0x4E2B80L,0x4F9F40L,0x4B9100L,0x4A25C0L,0x48F880L,0x494C40L,
  0xDA6000L,0xDBD4C0L,0xD90980L,0xD8BD40L,0xDCB300L,0xDD07C0L,0xDFDA80L,0xDE6E40L,
  0xD7C600L,0xD672C0L,0xD4AF80L,0xD51B40L,0xD11500L,0xD0A1C0L,0xD27C80L,0xD3C840L,
  0xC12C00L,0xC098C0L,0xC24580L,0xC3F140L,0xC7FF00L,0xC64BC0L,0xC49680L,0xC52240L,
  0xCC8A00L,0xCD3EC0L,0xCFE380L,0xCE5740L,0xCA5900L,0xCBEDC0L,0xC93080L,0xC88440L,
  0xECF800L,0xED4CC0L,0xEF9180L,0xEE2540L,0xEA2B00L,0xEB9FC0L,0xE94280L,0xE8F640L,
  0xE15E00L,0xE0EAC0L,0xE23780L,0xE38340L,0xE78D00L,0xE639C0L,0xE4E480L,0xE55040L,
  0xF7B400L,0xF600C0L,0xF4DD80L,0xF56940L,0xF16700L,0xF0D3C0L,0xF20E80L,0xF3BA40L,
  0xFA1200L,0xFBA6C0L,0xF97B80L,0xF8CF40L,0xFCC100L,0xFD75C0L,0xFFA880L,0xFE1C40L,
  0xB75000L,0xB6E4C0L,0xB43980L,0xB58D40L,0xB18300L,0xB037C0L,0xB2EA80L,0xB35E40L,
  0xBAF600L,0xBB42C0L,0xB99F80L,0xB82B40L,0xBC2500L,0xBD91C0L,0xBF4C80L,0xBEF840L,
  0xAC1C00L,0xADA8C0L,0xAF7580L,0xAEC140L,0xAACF00L,0xAB7BC0L,0xA9A680L,0xA81240L,
  0xA1BA00L,0xA00EC0L,0xA2D380L,0xA36740L,0xA76900L,0xA6DDC0L,0xA40080L,0xA5B440L,
  0x81C800L,0x807CC0L,0x82A180L,0x831540L,0x871B00L,0x86AFC0L,0x847280L,0x85C640L,
  0x8C6E00L,0x8DDAC0L,0x8F0780L,0x8EB340L,0x8ABD00L,0x8B09C0L,0x89D480L,0x886040L,
  0x9A8400L,0x9B30C0L,0x99ED80L,0x985940L,0x9C5700L,0x9DE3C0L,0x9F3E80L,0x9E8A40L,
  0x972200L,0x9696C0L,0x944B80L,0x95FF40L,0x91F100L,0x9045C0L,0x929880L,0x932C40L
};
//CRC单表大表查表算法:
unsigned long GetCRC24R_DA6000_555555_000000_Table(unsigned char *crcBuff, unsigned int crcLen) {
unsigned int i;
unsigned long crc = 0x555555;//初值
  for(i = 0; i < crcLen; i ++){
    crc = (crc >> 8) ^ CRC24R_DA6000_Table[(crc & 0xFF) ^ crcBuff[i]];
  }
  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 = GetCRC24R_DA6000_555555_000000_Table((unsigned char *)dataTable, sizeof(dataTable));
//表格函数返回crc=0xD98FE4,与HotWC3运算相同
  while(crc | 1);//死循环,请在此处设置断点,验证函数返回值crc是否正确!!!
  return 0;
}


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

www.hotcrc.com主页.jpg

CRC24R_D6A000_555555_000000源码(www.hotcrc.com自动生成).png (415.63 KB )

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

使用特权

评论回复

相关帖子

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

本版积分规则

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

1460

主题

21619

帖子

506

粉丝