janlyn
Junior Member level 1

adc problem
hello all...
i am a newbie in microcontroller...
hope u all can teach me...
jz now, i tried the sample code of ADC (PIC16F877)...
when i feed from 0v to 5v with resolution 1v, everything in expected besides 2v and 3v...
now,here is my question...
1) in pic16f877, there are 10 bit ADC = 1023. is tht mean 1 is equal 4.883mV in this case...so 1023x4.883mV =4.995V (~5V)?
2)if above is right, then when i fed AN0 with 3V, i jz get about 1.797V and while fed with 2V,i get 3.281V!others is still in condition...so, can u all help me to find where the problem is??i really stuck in this...
hello all...
i am a newbie in microcontroller...
hope u all can teach me...
jz now, i tried the sample code of ADC (PIC16F877)...
when i feed from 0v to 5v with resolution 1v, everything in expected besides 2v and 3v...
now,here is my question...
1) in pic16f877, there are 10 bit ADC = 1023. is tht mean 1 is equal 4.883mV in this case...so 1023x4.883mV =4.995V (~5V)?
2)if above is right, then when i fed AN0 with 3V, i jz get about 1.797V and while fed with 2V,i get 3.281V!others is still in condition...so, can u all help me to find where the problem is??i really stuck in this...