Page 1 of 1

ADC Channels pulling relatively same values

Posted: Wed Mar 27, 2019 9:00 pm
by Steven_SS
In Flowcode V8, on my atmega2560 I am pulling in values from each analog input(0-3). I am reading the adc for its corresponding channel(correctly). But when I am looking at-as an example-the first one(PF0), and it gives me 512, all the other channels follow similarly to that like their connected to the first channel. WHICH THEIR NOT, their supposed to be independent from each other.
The attachment below is how I am doing it for each channel. I have a component per channel(PF0-PF3). I have also tried just using one and re-setting the channels as I move on. No luck. I can't find anywhere in the forum or online that can help me with this.

What do I have to do to get these channel's readings all independent!?

Re: ADC Channels pulling relatively same values

Posted: Thu Mar 28, 2019 10:59 am
by Benj
Hello Steven,

You don't need the delays or the RawEnable / RawDisable macros. Just use the GetAverageInt macro.

To know more I would have to see the properties of the ADC components. Specifically the precharge time and conversion rate.

If you post your project file then I can have a look for you.