I’m looking at the code for a phase accumulator, and I must be a simpleton because I don’t get it. The code is simple enough:
Every Clock Tick do: accum = accum + NCO_param; return accum;
accum is a 32-bit register. Obviously, at some point it will roll-over.
My question really is: How does this relate to the phase?
This article may help.
In the running step, the counter (properly called the phase accumulator) is instructed to advance by a certain increment on each pulse from the frequency reference. The output of the phase accumulator (the phase) is used to select each item in the data table in turn. Finally, the DAC converts this sequence of data to an analogue waveform.