HI people!
I have a strange problem with 16f1827 chip . 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!
pic16f1827 ad conversion problem
Moderator: Benj
-
- 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
- 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.
-
- 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
You can solve this problem with this workaround:
http://www.matrixmultimedia.com/mmforum ... =29&t=8746
http://www.matrixmultimedia.com/mmforum ... =29&t=8746