piecewise table ok in simulation, not ok in PIC (by David R)
HI,
I am not to sure what is wrong here, the piecewise table
works fine in simulation but does not work well in the PIC.
I have attached the .ld file and the output of the serial.
The serial sends the raw data and the output of the table.
The table is to convert the output of A humidity sensor to
A real value.
the table is at line 71.
I can force the value with the move above at line 70.
I was able to narrow it down to 1742=50 and 1741=57
this is the point at which the result comes right from 1741 down to the next entry in the table.
The table seams to work ok when at the low end of the section.
every thing else works vary well.
Regards
David.
(no subject) (by David R)
here is the true maths to work out the value
this will work in excel.
B3 is the data.
=+(-4)+(0.0405*B3)+(-0.0000028*B3*B3)