Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - piecewise table ok in simulation, not ok in PIC

(you are viewing a thread; or go back to list of threads)

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.
Fri Feb 12 2010, 02:19:34
(no subject) (by David R)
I forgot to attach.
Fri Feb 12 2010, 02:21:34, download attachment sht75_com_cycle.ld
(no subject) (by David R)
and the serial out
Fri Feb 12 2010, 02:22:33, download attachment output2.txt
(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)
Fri Feb 12 2010, 02:27:33
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):