 #36
Averagesupernova
Science Advisor
Gold Member
 4,272
 1,061
@sophiecentaur I'll describe it with a little more detail.

I was using an 8 bit D/A with sine values stored in ROM. The address of the sine lookup table was also 8 bits wide but was derived from a 24 bit (or wider, can't recall) counter. I simply took the most significant 8 bits from this counter every 50 microseconds and used this as the address for the sine lookup table. Depending on how I stepped through the 24 bit counter would determine the frequency I wanted to synthesize. If you hadn't put it together yet, it's a numerically controlled oscillator.

Now where it got interesting is if I stepped through the counter in such small steps that the sine value didn't change from one 20 microsecond step to the next. I didn't really worry about it since the frequencies I wanted to synthesize were not in the range this occurred.

I was using an 8 bit D/A with sine values stored in ROM. The address of the sine lookup table was also 8 bits wide but was derived from a 24 bit (or wider, can't recall) counter. I simply took the most significant 8 bits from this counter every 50 microseconds and used this as the address for the sine lookup table. Depending on how I stepped through the 24 bit counter would determine the frequency I wanted to synthesize. If you hadn't put it together yet, it's a numerically controlled oscillator.

Now where it got interesting is if I stepped through the counter in such small steps that the sine value didn't change from one 20 microsecond step to the next. I didn't really worry about it since the frequencies I wanted to synthesize were not in the range this occurred.