Teensyduino 3.1 ADC external reference

Status
Not open for further replies.

dlchambers

Well-known member
I'm using a Teensy 3.1 in Arduino mode.

In core_pins.h for Teensy 3 there are these defs:
Code:
#define DEFAULT         0
#define INTERNAL        2
#define INTERNAL1V2     2
#define INTERNAL1V1     2
#define EXTERNAL        0
which are the possible arg values for analogReference().

But DEFAULT and EXTERNAL are both zero... how does one tell the Teensy 3.1 to use AREF?
 
But DEFAULT and EXTERNAL are both zero... how does one tell the Teensy 3.1 to use AREF?

AREF/VREFH is tied to VDDA = 3v3, so that's what it defaults to. technically then, DEFAULT uses a/the external reference; there's no difference. you can override that by using a external (shunt) voltage reference (< 3v3). take a look at the schematic for details. alternatively, analogReference(INTERNAL) will select the internal reference.
 
Status
Not open for further replies.
Back
Top