I am using a PIC 16F88 to display the temperature. The vref is 2.5V.
A portion of the code is as follows:
and then in main the following is part of a loop:
temp value, and temp are unsigned long
Is that code correct? The output likes to skip some numbers, which doesn't make sense to me since the resolution is well within the range of being able to detect a 10mV change.
A portion of the code is as follows:
Code:
unsigned long get_temp()
{
go = 1;
while (go);
return (adresh * 256 + adresl);
}
and then in main the following is part of a loop:
Code:
tempvalue = get_temp();
temp = ((tempvalue * 250) / 1023);
temp value, and temp are unsigned long
Is that code correct? The output likes to skip some numbers, which doesn't make sense to me since the resolution is well within the range of being able to detect a 10mV change.