' **Setting for ADC of 16F88**
Define ADC_BITS 10 ' 10-bit ADC used
Define ADC_CLOCK 3 ' Internal clock used
Define ADC_SAMPLEUS 50 ' Sample timing
Samples var word:Sample var byte:Vin var Word:Samples=0
ADCloop:
For Sample=1 to 10:ADCIN 2,Vin:Samples=Samples + Vin:Pause 200 Next sample
Vin=Samples/10:Vin=(Vin*/500)>>2:Lcdout $fe, 1:LCDOUT $FE,2
Lcdout "Temp=",DEC (Vin DIG 2),DEC (Vin DIG 1),".",DEC (Vin dig 0),"C"
Samples=0:goto ADCLoop