pic16f1827 ad conversion problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Dmitry Maximenko
Flowcode V4 User
Posts: 36
Joined: Mon Sep 26, 2011 10:26 pm
Has thanked: 9 times
Been thanked: 2 times
Contact:

pic16f1827 ad conversion problem

Post 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!
Attachments
Sampling and outputting to a LCD.fcf
Test with ADC on 16f1827
(7.5 KiB) Downloaded 233 times
Last edited by Dmitry Maximenko on Thu Sep 29, 2011 10:43 am, edited 1 time in total.

Rosenbaum
Flowcode V4 User
Posts: 25
Joined: Thu Feb 22, 2007 3:20 pm
Has thanked: 1 time
Been thanked: 5 times
Contact:

Re: pic16f1827 ad conversion problem

Post by Rosenbaum »

You can solve this problem with this workaround:
http://www.matrixmultimedia.com/mmforum ... =29&t=8746

Post Reply