This is the modified code by implemented the resource of link provided, but somehow there is no output to the screen... anything wrong??


DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically

DEFINE ADC_BITS 10 ' ADCIN resolution (Bits)
DEFINE ADC_CLOCK 2 ' ADC clock source (Fosc/32)
DEFINE ADC_SAMPLEUS 11 ' ADC sampling time (uSec)

x var byte
y var byte

TRISA = %00111111 'Set PORTA to inputs
TRISC = 0 'Set PORTC to outputs
ADCON1 = %10000000

loop1:

Pauseus 50
ADCON0.2 = 1 'start conversion
Pauseus 50

ree:
if ADCON0.2 = 1 then ree
ADCIN 0,x
y = x * 100 'multiply 100 to change to degree celcius
HSEROUT [y]
pause 500

goto loop1
end