For a LPC922 microcontroller (with SDCC) I want to create a lookup table with linear interpolation.
Lets assume I got x and y values like
x=300 y=10,0201
x=700 y=89,542
x=800 y=126,452
x=900 y=171,453
x=1500 y=225,123
How can the code for a lookup table with linear interpolation look like, so I get for example for x=850 the right value for y ((171,453+126,452)/2)?
1 Answer