This repository contains files to demonstrate the working of FEC Encoding and Decoding library rs8 created by Philip Heron [email protected] and transmission and reception of the encoded data using ASK Transmitter and Receiver Modules.
Files:
- rs8_transmitter
- rs8_receiver
Library used : rs8
Github link : https://www.github.com/fsphil/ssdv/tree/master/
Created by Philip Heron [email protected]
- Download the file in zip format
- In Arduino IDE, goto
Sketch
>>Include Library
>>Add .zip library
- Select downloaded .zip file
- Go to
File
>>Examples
>>FEC-for-ASK-Module
and choose the required program.
The rs8 library is a Reed Solomon Forward Error Correction Library that encodes the message with 32 extra bytes for error detection and correction and correctly decodes the message in case some bytes are corrupted.
This function encodes the original message with 32 extra bytes at the end for error correction
Example : encode_rs_8(&data[4],&data[68],223-64);
It takes 3 parameters:
- address of start byte of message
- address of start byte to store correction code (can also be a different variable)
- 223 - length of message Here 223 signifies maximum data length 255, wherein 32 bytes are reserved for correction code
This function decodes the received encoded message and loads the corrected message into the specified memory location
Example : decode_rs_8(&data[4],0,0,223-64);
It takes 4 parameters:
- address of start byte of received message
- clock-bit where signal fading occurred. For digital application, this byte should be zero
- no of times signal fading occurred. For digital application, this byte should be zero
- 223 - length of expected original message