Page 1 of 1

pic16f1827 ad conversion problem

Posted: Thu Sep 29, 2011 10:15 am
by Dmitry Maximenko
HI people! :-)
I have a strange problem with 16f1827 chip :oops: . I'm trying to use AD converter , but did not quite succeed:-(.
I used the same experiment with pic16f690 and then it was no problem.
I do not know what is the problem right now. It looks good when I simulate in Flowcode, but when I run in 16f1827 then jumps up and down values​​(256-512-712 etc). I did everything like in the 16f690.

I had used an LED from the beginning adn decision box to see that it starts to shine when the ADC value is greater than the 440. But LED lights and off all the time. I used a potentiometer(5Kohm) (ground-1K-pot (1K from the middle to the MCU)-1K +5 volts) + stabilizing capacitor 10nF between gruond and MCU ADC pin. Have used the right pin on the ADC.
When it did not work I switched to an LCD. Then I saw that values ​​were not stable.

Another question. How to use the internal voltage reference for AD conversion?
16f1827 have Fixed Voltage Reference (FVR) with 1.024V, 2.048V and 4.096V
I would prefer 2.048V

Please help me.
Very grateful!

Re: pic16f1827 ad conversion problem

Posted: Thu Sep 29, 2011 10:27 am
by Rosenbaum
You can solve this problem with this workaround:
http://www.matrixmultimedia.com/mmforum ... =29&t=8746