Piecewise Linear Interpolation on PIC12/14/16 Series Microcontrollers
The embedded systems world is filled with sensing and measurement techniques that present non-linear output results. If the sensing technique is well characterized, a mathematical transfer function can be used to correct and linearize the sensor output. In many cases, these functions contain complex polynomial and exponential functions, placing a great burden on the program memory, RAM and execution speed of most low-cost microcontrollers.
This application note will explore a simple Piecewise Linear Interpolation technique that is often employed to linearize a sensor's output. The design engineer must understand the benefits and limitations of this technique, which will be explained in this application note.