I’m designing a master-slave, one way RS-485 over plastic fiber optic physical link layer network using low power PIC MCU. While I expect the link layer to be very reliable, nothing is ever perfect.
Since the network is unidirectional to keep costs down, I’m thinking some form of Forward Error Correcting code is in order. The data packet content is simple:
Slave address (one byte) Opcode (one byte) Operands (four bytes) So just six bytes of application data passing from Raspberry Pi transmitter UART at up to 56K baud -> plastic fiber optic transmitter -> PFO cable up to 20 meters -> PFO receiver -> PIC12LF1822 MCU UART as RS-485 slave node.
I could just use a CRC to detect errors but since the link is one way, there’s no way to NAK a bad packet for retransmission.
This seems like a good use case for forward error correction but I have no experience with FEC. What algorithm or other things should be considered, given I need as close to 100% reliability as possible. Preferably an FEC algorithm that can be implemented in C code on a PIC MCU.