Using analogReference()

I have a couple questions about using analogReference on an Pro Mini 3.3volts.

If I set the reference to 1.1volts with analogReference(INTERNAL), I assume it's till okay to have the actual voltage on the pins go up to 3.3 volts. Is that correct?

Can I change the analogReference before I read an input, then change it back to read a different input. Any issues with doing this. For example:

analogReference(INTERNAL);
analogRead(0);
analogReference(DEFAULT);
analogRead(1);

ScottG:
I have a couple questions about using analogReference on an Pro Mini 3.3volts.

If I set the reference to 1.1volts with analogReference(INTERNAL), I assume it's till okay to have the actual voltage on the pins go up to 3.3 volts. Is that correct?

Yes, electrically no problem, however all values above 1.1vdc will read as 1023 counts.

Can I change the analogReference before I read an input, then change it back to read a different input. Any issues with doing this. For example:

analogReference(INTERNAL);

analogRead(0);
analogReference(DEFAULT);
analogRead(1);




**Yes in theory it will work, but I've found that a analogRead() right after a change in analogReference() will usually return a 'faulty' value. I've usually do a couple of analogReads on the same pin after such a reference change and the last reading tends to be OK. You may have to play around with it to see what you get.**
**Lefty**

That's a neat trick, I'm gonna have to try it out

ScottG:

analogReference(DEFAULT);

int A0 = analogRead(0)*(1.1/5);
analogRead(1);

jerrymonkey123:

Can someone please explain what this snippet does? Especially how will the variable 'A0' be used after calling this snippet?

Thank you

Just a useless snippet from a poster long gone.

A0 is a poor name for a variable, and 1.1/5 doesn't make sense.

If you have a question about analogReference(), then create your own thread.
Read the "how to post" sticky before you do.
leo..