A discrete time counter oscillator expressed in C code wil produce sine wave like signal:
P,P+ and g represents the current phase, next phase value, and increment value respectively. To implement this in software the register is simply a variable that retains its value between updates and the look up table is an array. In taking upper 5 bits of P into the array, the array will have 32 different values.
The Step frequency is the change in frequency when the increment value changes by one. The value Nr is the number of phase register bits, Fs is the update or sample frequency, and Fstep is the step frequency. For this project make Nr equal to 16 bits.
Fs
Fstep = --------
2Nr
can anyone write a program for it using pointers and array
....