This sub takes care of the outside temperature
And then i would like another sub that takes care of the inside temperature.
Should that be possible ?
how should i ask it to use input 2, ex RA1 ?
Rich (BB code):
void vis_temp (void) // Viser temperaturen
{
unsigned int degree,celcius;
char grader[4];
ADON=1;
lcd_clear();
GO_DONE=1; // initiate conversion on the channel 0
while(GO_DONE) continue;
degree = ADRESL; // Get the 8 bit LSB result
degree += (ADRESH << 8); // Get the 2 bit MSB result
celcius=(((5000/1024)*degree)-500)/10;
lcd_goto(0x00);
lcd_puts(" Ude Temp : ");
utoa(grader, celcius, 10);
lcd_puts(grader);
}
Should that be possible ?
how should i ask it to use input 2, ex RA1 ?
Rich (BB code):
void vis_temp_in (void) // Viser temperaturen
{
unsigned int degree,celcius;
char grader[4];
ADON=1;
lcd_clear();
GO_DONE=1; // initiate conversion on the channel 0
while(GO_DONE) continue;
degree = ADRESL; // Get the 8 bit LSB result
degree += (ADRESH << 8); // Get the 2 bit MSB result
celcius=(((5000/1024)*degree)-500)/10;
lcd_goto(0x00);
lcd_puts(" In Temp : ");
utoa(grader, celcius, 10);
lcd_puts(grader);
}