5.3.67 _Q16sinSeries Function

Generates the sine series with the given normalizing frequency, f, and the given number of samples, num, starting from start. Stores the result in buffer, buf.

Include

<libq.h>

Prototype

short _Q16sinSeries(_Q16 f, short start, short num, _Q16 *buf);

Arguments

fa fixed-point number in Q16 format, which ranges from 0 to (231-1). The valid range of values for this argument is from -32768 to 32768. The argument represents the Normalizing frequency.
starta fixed-point number in Q16 format, which ranges from 0 to (231-1). The valid range of values for this argument is from 1 to 32767. This argument represents the Starting Sample number in the Sine Series.
numa fixed-point number in Q16 format, which ranges from 0 to (231-1). The valid range of values for this argument is from 1 to 32767. This argument represents the Number of Sine Samples the function is called to generate.
Note: num should not be more than 16383 for dsPIC and 32767 for PIC devices.
bufa pointer to the buffer where the generated sine samples would get copied into.

Return Value

This function returns num, the number of generated sine samples.