Nice code. I tried CRC8 and the result is correct.
This is a lovely little bit of code. I was looking for a nice simple easy to understand implementation of CRC-CCITT16 that would easily integrate into my C code for cross-compilation to ARM11. I also wanted to be able to test it under cygwin on Windows. Integrated and compiled without effort in both cases. Nice work Francisco. If you ever feel inclined it would be nice to have an iterative routine that could encode one byte at a time as they arrive - say in an ISR where your look-up method for the encoding polynomial is plenty fast. Many thanks!