Teensy 3.5 DAC Reference Select

cgeber24

Member
How does one configure the Teensy 3.5 12-bit DAC to use the internal reference voltage? Or is this the default configuration? The CPU datasheet indicates that the DAC reference voltage can be either VDDA or VREF_OUT.
 
You can modify the core arduino files to enable this. The analog_reference_internal variable is not set again after init, so should be pretty safe.

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3\ analog.c
Code:
static uint8_t analog_reference_internal = 0; //set this to 1 to use the 1.2Vref
 
Thanks Wassabi - I have also found thru experimentation that the callable function analogReference(INTERNAL), which is usually used for the ADC, will also accomplish the desired function for the DAC, thus removing the need for source code modification.
 
Back
Top