Quote Originally Posted by Acetronics View Post
One more thing ...

The compiler doesn't like " ° " ( "Maj" + "=" ) character ...

better use

Code:
Lcdout $FE,$C0,"ITS: ",DEC3 tb0,".",DEC2 tb1, 223, "C"
where 223 ( sometimes 178 ) is supposed to be the ASCII code of " ° " ...

That said ... ADC value NEVER is > 1023 ...

from your firsts explanations ( post #1) ... I get That : ( 16F877A on EasyPic5 )

Code:
 
DEFINE ADC_BITS 10      ' Set number of bits in result
DEFINE LCD_DREG PORTB       ' Set LCD Data port
DEFINE LCD_DBIT 0           ' Set starting Data bit (0 or 4) if 4-bit bus .7
DEFINE LCD_RSREG PORTB      ' Set LCD Register Select port
DEFINE LCD_RSBIT 4          ' Set LCD Register Select bit 
DEFINE LCD_EREG PORTB       ' Set LCD Enable port
DEFINE LCD_EBIT 5           ' Set LCD Enable bit i.e, PORTE.4
DEFINE LCD_BITS 4           ' Set LCD bus size ot 4 bit Upper Nibble (4 or 8 bits)
DEFINE LCD_LINES 2         ' Set number of lines on LCD to 4 Lines
 
TRISA  = %11111111
TRISB  = 0
TRISC  = 0
 
CMCON  = 7
ADCON0 = %11000001
ADCON1 = %10000100   
 
ntc VAR WORD
tb0 VAR WORD
tb1 VAR WORD
tb2 VAR WORD
 
PAUSE 700
LCDOUT $fe,1
lp:
ADCIN 1,ntc
tb0 = ntc * 33 /92 
tb1 = tb0*721                                     
tb2 = Div32 255
tb2 = tb2 - 64
tb0 = tb2/10   
tb1 = tb2//10    
 
PAUSE 200
 
LCDOUT $FE,2,DEC4 ntc
Lcdout $FE,$C0,"ITS: ",DEC3 tb0,".",DEC1 tb1,178,"C"
goto lp
Gives me a 0 - 100°C scale for adc = 67 to 1023 ...

so, i suppose it to be " not so bad , but to confirm "
Alain
Ok, my problem is largely solved, and if change my PIC, I'll be warn of ADC values. I think my PIC is a special case.
Thanks everyone.