资料介绍
The embedded systems world is filled with sensing and
measurement techniques that present non-linear
output results. If the sensing technique is well charac-
terized, 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. This technique has many
advantages in faster execution speed using a simple
look-up table and significantly reduced program
memory and RAM requirements. However, this
technique can introduce a considerable error compo-
nent with certain transfer functions. Therefore, the
design engineer needs to understand the benefits and
limitations of this technique, which will be explained in
this application note. AN942
Piecewise Linear Interpolation on PIC12/14/16 Series
Microcontrollers
EQUATION 1: STEINHART-HART
Author: John Day and Steven Bible
Microchip Technology Inc. 1
= A + B(1n R) + (1n R)3
TK
Solving for temperature in degrees Celsi