While using ADCin works fine, using direct register manipulation does not. Can anyone tell me why?
The above does not work. The next one works just fine though...Code:PORTA = 0 PORTB = 0 TRISA = %00000011 TRISB = %00001011 ADCON0 = %00000000 'select channel AN0, ADC off ADCON1 = %01110000 'Internal Frc, Left justified, Ext. ref. ANSELA = %00000001 ' AN0 on Port A analog ANSELB = %00000000 ' Digital inputs start: adcon0.1=1 while adcon0.1:wend hserout ["Adresh: ",#adresh,13,10] pause 1000 goto start
Thanks,Code:start: pause 1000 adcin 0,i hserout ["Adc: ",#i,13,10] goto start
Ioannis




Bookmarks