picbasic pro lcdout dec 32bits
If you still haven't figured it out you can give this a try. There are lots of ways around this problem and here is one example.
adcin 0, temp 'Reads ambient temperature
IF temp >= 428 THEN 'Checks if temp is greater than
'or equal to 0 deg C
temp1 = (temp-428)/9 'Calculates temp in degrees C
lcdout $FE,1 'Clear LCD
lcdout $FE,$80, "Initializing...."
lcdout $FE,$C0, "Temp = ",DEC temp1, " Deg C"
ENDIF
IF temp < 427 THEN 'Checks if temp is less than 0 deg C
temp1 = (temp-427)/(-15) 'Calculates temp in degrees C
lcdout $FE,1
lcdout $FE,$80, "Initializing...."
lcdout $FE,$C0, "Temp = ","-",DEC temp1, " Deg C"
ENDIF
You can calculate the A/D value that causes the equation to go negative and use IF statements to split the positive and negative parts. The example above splits at the 0 crossing and uses a new equation for the negative value. The new equation devides the negative sign out and then you just display a "-" charactor before the negative number.
Hope this helps.
Wade :idea: