I feel stupid asking this question, how do you handle negitive numbers. I have an if statement the says if(pressure<LoPoint){lo_point_flag=1;} When the pressure is negitive it does not work.. I am sure it simple, but I pulling out the only hair I have left, trying to find the answer... Oh all varables are signed long.
Thanks all
CCS 3.249
Pic18lf2520
jma_1
Joined: 08 Feb 2005 Posts: 147 Location: Wisconsin
Posted: Fri Oct 20, 2006 10:54 am
Greetings,
If you define your pressure as an int8, int16, or in32 they are by default unsigned. The A/D conversion from a PIC only returns positive values. Without more information I cannot say what the problem is.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum