Hello, I'm writing an Xmodem implementation (sending mode only). The code is complete. However, when run no data is received at the other end. I've narrowed the problem down to my CRC-16 implementation. These are the functions in question: /******GLOBAL VARIABLES*******/ unsigned int totalCrc; // Tx CRC char CrcLowByte; // Storage for CRC char CrcHighByte; /*****************************/ void ClearCrc(void) { totalCrc=0; CrcHighByte = 0; CrcLowByte = 0; } // Add next character to the CRC checksum for Xmodem packets unsigned int calc(unsigned int c) { char i; // Just a loop index c &= 0xFF; // Only calculate CRC on low byte for (i=0;i<8;i++) { // Loop eight times, once for each bit if (c&1) { // Is bit high? c >>= 1; // Position for next bit c ^= 0x1021; // Toggle the feedback bits } else c >>= 1; // Just position for next bit } return c; // Return the 16 bit checksum } // Update CRC with new char void UpdateCrc(unsigned char c) { totalCrc = calc((unsigned int)c^totalCrc) ^ (totalCrc/256); // Add CRC from this char to running total } void FinishCrc(void) { totalCrc=(totalCrc & 0xFFFF); CrcHighByte = (*((unsigned char*)&crc +1)); CrcLowByte = ((unsigned char)crc); } and they are called within the main program code as follows: main(void){ ........... .......... ClearCrc(); for (i=0;iuP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads