kindly tell me any efficient code for generating CRC for 40 bytes data I am using the modulo 2 division method.
with thanks, karthik.
Any particular CRC? CRC8, CRC16, CRC32. Any specific polynomial? Size efficient? or Speed efficient? Tables are faster and bigger. Full calculations the slowest. ASM would speed that up a little.
Any pre- and/or post-conditioning?
Small table or medium table or large table?
i am using CRC16(modulo2).But table method how to implement it..In net I have seen table they have created for 256 bytes.But my internal memory size is 256...
But the table contain constants, so you can prebuild it and store in the code space.
finally i am using this code....
int Calc_CRC(unsigned char b[], unsigned int CRC,int nBytes) { bit carry; int i,j; for(j=0;j<nBytes;j++) { carry=0; CRC ^= b[j] & 0xFF; for (i=0; i<8; i++) { carry = CRC & 0x0001; CRC>>=1; if (carry) { CRC ^= GP; } } } return CRC; }
How to store the table code space I am new to embedded...kindly help me......
How to store the table code space Please read the manual
I am new to embedded then the first thing you should do is to work through (I did not say 'read') the Getting started Guide.
Erik
"finally i am using this code...."
That code doesn't use a table.
View all questions in Keil forum