I'm working on a microcontroller DDS project in C and am having some trouble figuring out how to compute a linear interpolation to smooth the output values. The program as it stands now
uses the top 8 bits of a 24 bit accumulator as an index to an array of 8 bit output values. I need to come up with a function that will take the middle and lower byte of the accumulator and generate a value in between the "previous" and "next" value in the array. This would be straightforward enough on fast hardware, but since I'm using a microcontroller I really need to avoid doing any floating point operations or divisions!
With those restrictions, I'm not certain of a way to go about getting an 8 bit interpolated value from my two 8 bit input numbers and the lower 2 byes of the accumulator, which represents the "distance" between the two input values. Thanks in advance for any advice!
CLARIFICATION
DDS = Direct Digital Synthesis
in DDS a waveform is generated from a lookup table using a phase accumulator. The phase accumulator usually contains an integer component and a fractional component. The integer component is used as an index into the lookup table. In simple DDS implementations the fractional part is ignored, but for higher quality output the fractional component is used to interpolate (usually just linear interpolation) between adjacent lookup table values. For the above question we are looking at how to efficiently perform this linear interpolation between two lookup table values for a given fraction, f, where 0 <= f < 1
.