From bd77a5f985999f20de293a9686de3329c2fcfe45 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 24 Nov 2017 16:22:35 -0800 Subject: [PATCH] Document supported analogReference values for SAMD and SAM References: - https://github.com/arduino/ArduinoCore-samd/blob/1.6.16/cores/arduino/wiring_analog.c#L99-L120 - https://github.com/arduino/ArduinoCore-sam/blob/2a17b0d9daa5ae20630553c4877f88e28f3e44a3/cores/arduino/wiring_analog.h#L27-L40 Fixes https://github.com/arduino/reference-en/issues/266 --- .../Functions/Analog IO/analogReference.adoc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Language/Functions/Analog IO/analogReference.adoc b/Language/Functions/Analog IO/analogReference.adoc index 9cc5b5005..2db71ee8e 100644 --- a/Language/Functions/Analog IO/analogReference.adoc +++ b/Language/Functions/Analog IO/analogReference.adoc @@ -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] @@ -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