ATTiny841 PA0 as AREF vs A0? #888
Closed
Simulators
started this conversation in
General
Replies: 1 comment
-
Answering my own question now I've breadboarded a prototype... ;) With analogReference(DEFAULT), physical pin 13 functions as analog input A0 (and the reference voltage it measures against is Vcc). With analogReference(EXTERNAL), pin 13 functions as AREF, and the voltage applied to it is the reference against which all the other analog inputs are measured. It just works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trying to get my head round the pin allocations on the ‘841, and the multiple functions that pins can have… If I am using the default 5V Vcc analogReference(DEFAULT), can I use physical pin 13, PA0, as an analog input pin A0? Do I need to do any other configuration in code to make that happen?
Conversely, if I set analogReference(EXTERNAL) (and apply a reference voltage to PA0 as AREF!), is that all I need to do to use that as the reference source, and does the ability to have an A0 input just disappear?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions