while(TRUE) { packet_buffer[0] = '3'; packet_buffer[1] = '1'; packet_buffer[2] = '1'; packet_buffer[3] = '0'; packet_buffer[4] = 'T'; packet_buffer[5] = 'K'; packet_buffer[6] = 'H'; packet_buffer[7] = 'I'; packet_buffer[8] = '!'; send_packet(packet_buffer, 10); // send message //delay_ms(500); } } // SEND_PACKET void send_packet(int* packet_ptr, int16 packet_length) { int *ptr; int16 CRC,i; ptr = packet_ptr; CRC=generate_16bit_crc(ptr, packet_length,CRC_CCITT); printf(lcd_putc,"%lu ", crc); //CRC result --> Test LCD for(i=0; iTest LCD putc(packet_ptr[i]); //String/Serial --> Crystalfontz } putc((int)(CRC>>8)); // send CRC putc((int)(CRC)); }