Good ol' 16F877 but getting on my nerves...
Why this does work:
Code:
ADCON0 = %11000001 ' Set RC clock and enable ADC
ADCON1 = %00001110 ' Set PORTA.0 to analog,left justify, rest digital
TRISA = %00000101 ' RA0:Analog input 0
adcin 0,level
and this does NOT?
Code:
ADCON0 = %11000001 ' Set RC clock and enable ADC
ADCON1 = %00001110 ' Set PORTA.0 to analog,left justify, rest digital
TRISA = %00000101 ' RA0:Analog input 0
high adcon0.2 ' start conversion
while adcon0.2:wend ' wait to finish
level=adresh ' get 8-bit value to level variable
Ioannis
Bookmarks