I would like to implement the example code from SigLib's example "fsk.c". The defines are below
#define SAMPLE_LENGTH ((SLArrayIndex_t)512) #define NUMBER_OF_LOOPS 4L #define SAMPLE_RATE 9600.0 #define BAUD_RATE 1200.0 /* Number of samples per symbol */ #define SYMBOL_LENGTH ((SLArrayIndex_t)(SAMPLE_RATE / BAUD_RATE)) #define MAX_RX_STRING_LENGTH ((SLArrayIndex_t)80) /* Frequency of sine wave in table */ #define CARRIER_TABLE_FREQ ((SLData_t)100.0) /* Number of samples in each of cos and sine table */ #define CARRIER_SINE_TABLE_SIZE ((SLArrayIndex_t)(SAMPLE_RATE / CARRIER_TABLE_FREQ)) /* Must be an integer number of cycles */ /* Rx Filter length */ #define RX_FILTER_LENGTH ((SLArrayIndex_t)((2 * SYMBOL_LENGTH) + 1)) /* Low carrier frequency */ #define FREQ_1300_HZ 1300.0 /* High carrier frequency */ #define FREQ_2100_HZ 2100.0 /* Carrier frequency for '0' */ #define CARRIER_FREQ_ZERO FREQ_2100_HZ /* Carrier frequency for '1' */ #define CARRIER_FREQ_ONE FREQ_1300_HZ /* Bandwidth of detection filter */ #define FILTER_BANDWIDTH 400.0
The initialization call to the function is this:
`SIF_FskModulate (pCarrierTable, (CARRIER_TABLE_FREQ / SAMPLE_RATE), CARRIER_SINE_TABLE_SIZE);`
In the code, the second parameter: (CARRIER_TABLE_FREQ / SAMPLE_RATE)
is commented with:
/* Carrier frequency */
This number works out to a fractional amount - 100.0/9600 = small. How is this used? What would the FSK carrier be set to, or is that determined by the rate at which you load the pData array into the DAC?
Can someone clarify what that means in terms of using this code?
Thank you!