Skip to content

Document supported analogReference values for SAMD and SAM #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Language/Functions/Analog IO/analogReference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,27 @@ subCategories: [ "Analog I/O" ]
=== Description
Configures the reference voltage used for analog input (i.e. the value used as the top of the input range). The options are:

Arduino AVR Boards (Uno, Mega, etc.)

* DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards)
* INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328P and 2.56 volts on the ATmega8 (not available on the Arduino Mega)
* INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
* INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)
* EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference.

Arduino SAMD Boards (Zero, etc.)

* AR_DEFAULT: the default analog reference of 3.3V
* AR_INTERNAL: a built-in 2.23V reference
* AR_INTERNAL1V0: a built-in 1.0V reference
* AR_INTERNAL1V65: a built-in 1.65V reference
* AR_INTERNAL2V23: a built-in 2.23V reference
* AR_EXTERNAL: the voltage applied to the AREF pin is used as the reference

Arduino SAM Boards (Due)

* AR_DEFAULT: the default analog reference of 3.3V. This is the only supported option for the Due.

[%hardbreaks]


Expand All @@ -34,7 +50,7 @@ Configures the reference voltage used for analog input (i.e. the value used as t

[float]
=== Parameters
`type`: which type of reference to use (DEFAULT, INTERNAL, INTERNAL1V1, INTERNAL2V56, or EXTERNAL).
`type`: which type of reference to use (see list of options in the description).

[float]
=== Returns
Expand Down