Jeremy Leach
Senior Member
This module allows lookup of Y-values from a 'graph' from a known X-value. The graph is stored in EEPROM as a series of points at evenly-spaced X values. When the given X value is between stored points, the code interpolates the Y-Value, assuming a straight line between the points.
This module is based on my method for writing modular code on a 28X1 referred to in another thread.
The code includes an example for ArcTan, but you can put in your own data. It also has the ability to reference multiple graphs.
Creating the data is best carefully done in a spreadsheet.
This module is based on my method for writing modular code on a 28X1 referred to in another thread.
The code includes an example for ArcTan, but you can put in your own data. It also has the ability to reference multiple graphs.
Creating the data is best carefully done in a spreadsheet.
Attachments
-
7.8 KB Views: 105