
It's weird. I got a 16-bit result. Why? Code :
Code:
define OSC 20
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 10
DEFINE LCD_DREG PORTC
DEFINE LCD_RSREG PORTC
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 5
DEFINE LCD_COMMANDUS 10000'Command delay time in us
DEFINE LCD_DATAUS 1000 'Data delay time in us
ntc VAR WORD
TRISA=%11111111
ADCON1=%10000010
PAUSE 4000
lp:
ADCIN 1,ntc
PAUSE 100
Lcdout $fe,$c0,#ntc
goto lp
you do not display Tb0 ( as the ADC result ) , but Tb0
And what are the differences between Tb0 and Tb0? I didn't understand your answer.
Bookmarks