lammertb / libcrc

Multi platform CRC library
MIT License
576 stars 247 forks source link

crc16 modbus #1

Closed ashoksolanki1993 closed 5 years ago

ashoksolanki1993 commented 7 years ago

I am using MPLAB X IDE with device dspic33fj32mc304 which has inbuilt crc generator but it not gives me appropriate results for poly=0X8005; i tried all the documents provided by microchip but i don't get what i want. in the code of crc16 modbus which i want from your site is want lookup table but there is nothing in c file or inc file. please help me with this small issue. i uses XC16 compiler in MPLAB. for data 01 04 00 04 00 02 crc16 modbus is 0A 30 is not achive

lammertb commented 5 years ago

The lookup table is dynamically generated with the first call to the routine. After that you can output the table with a number of printf statements to your own file to be incorporated in other projects.