![]() The AX.25 protocol uses the standard CRC-CCITT code based on a 16-bit. It couldn't even compose an entire frame in advance in a buffer - the pieces of the payload were all generated on the fly. Six months later, the United States had launched an orange of 8 kg in space. I was doing it a bit at a time because it was being done on an 8-bit microcontroller with 192 bytes of RAM. After the last data bit, take the ones complement (inverse) of the FCS value and send it low-byte first. If the bit that was shifted off (formerly bit 1) was not equal to the bit being sent, exclusive-OR the FCS value with 0x8408. For each data bit sent, shift the FCS value right one bit. The CRC-CCITT algorithm has plenty of published code examples, but the one I needed, and had trouble finding, was the algorithm for calculating the FCS one bit at a time, rather than a byte at a time. It's generated using the CRC-CCITT polynomial, and is sent low-byte first. This is a two-byte checksum added to the end of every frame. From some notes I wrote close to 20 years ago: ![]() The same algorithm is used both for CRC generation in the transmitter and for CRC. Are you specifically trying to calculate one for HDLC frames? Because the HDLC FCS should be CRC-CCITT. AX.25 V2.0 introduced a terrible nuisance called the poll/final bit. What CRC are you trying to use? There are various different polynomials.
0 Comments
Leave a Reply. |