Quedó funcionando desde -55°C hasta 106°C y creo que es demasiado para mí.
Gracias nuevamente a quienes colaboraron y a quien lea esto:
//Termometer.
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
int lm_35, v1, v2, temp;
char txt[15];
void main(){
OSCCON=0x40; // Oscilador interno a 1Mhz.
while (OSCCON.IOFS==0); //Esperar mientras el oscilador se estabiliza.
PORTA=0x00; //Inicialización.
ANSEL=0x0F; //Pin RA0/AN0, RA1/AN1, RA2/AN2 y RA3/AN3 como entradas analógicas.
//ADCON1=0x08; //Configura AVcc y Vref-.
TRISA=0x0F; //Pin RA0/AN0, RA1/AN1, RA2/AN2 y RA3/AN3 como entradas.
Lcd_Init(); //Inicializa el LCD.
Lcd_Cmd(_LCD_CLEAR); //Borra el display.
Lcd_Cmd(_LCD_CURSOR_OFF); //Apaga el cursor.
Lcd_Out(1,2, "Temperatura"); //Muestra rótulo.
Lcd_Out(2,12, "C"); //Muestra temperatura.
do {
v1=ADC_Read(0); //Obtiene 10 bits de la conversión del canal 2.
v2=ADC_Read(1);
if (v1 > v2)
lm_35=v1 - v2;
else if(v1 < v2)
lm_35 = -(v1 + v2);
else
lm_35 = 0;
temp=(lm_35*150)/307; //Convierte lectura en grados centígrados.
IntToStr(temp,txt);
Lcd_Out(2,5, txt);
}while(1);
}