Two things I have noticed in your code:
1/. The 16F1826 has a 10 bit ADC whereas you have defined an 8 bit setup
2/. ADCCON0 = %00001001 sets the ADC channel to be AN9 where you are trying to use AN2
Cheers
Barry
VK2XBP
Two things I have noticed in your code:
1/. The 16F1826 has a 10 bit ADC whereas you have defined an 8 bit setup
2/. ADCCON0 = %00001001 sets the ADC channel to be AN9 where you are trying to use AN2
Cheers
Barry
VK2XBP
Bookmarks