I have an app that occasionally needs to send data on a rather noisy link. Packets are typically 16 or 32 bytes long. If it matters, noise may cause bits to be flipped, but never erased. Right now I'm using CRC to detect errors and request retransmission.
The question is: Is an 8-bit CPU powerful enough to handle error correction? I'm having a lot of trouble finding a decent starting point explaining algorithms. Specifically: Which algorithms can be used? And how many extra bytes are required to correct E errors in an N-byte packet?
Source code would be great, in any language, as long as it does not assume previous knowledge of error-correction or is augmented by sufficient information. The ideal implementation, I think, would receive an array(data+length) of bytes and number of errors to correct and return an array of error correcting data; another function would receive all of these (+ any errors) and return the error-corrected data.
Another question: How can I tell if the errors were corrected successfully? It looks like I'd still need to calculate a CRC before adding the error correction data.
Of course feel free to point out anything I might have missed.