In normal operation, the A0 DAC will produce an output voltage that is a fraction of the DAC's reference voltage as present on the Feather's AREF pin. Since the AREF pin is directly connected to the Feather's +3V power (nominally 3.3 volts), the DAC output is a fraction of the +3V supply voltage. Fortunately, the copper trace that connects AREF to 3V was designed to be removed, allowing other reference voltages to be substituted for +3V.
After the trace was removed, the 0v to +3v output of the waveform generator was connected to the AREF pin. The DAC reduced the voltage of the waveform generator, providing a variable amplitude based on the DAC digital input value. The ADSR envelope was generated by manipulating the DAC value in the CircuitPython code.
The signal distortion caused by the AREF minimum bias voltage value (~1v) is clearly shown below. However, the test proved that the M4's on-board DAC can be successfully used to control AREF signal amplitude as long as the AREF signal voltage is between Vcc and +1v.
WARNING: Remove the trace between 3V and AREF on the Feather board before attaching anything to the AREF pin. Don't connect any voltage to the AREF pin greater than the 3V provided by the Feather or lower than 0V (no negative voltage).
- It's possible to modulate the wave generator's output using the Feather M4 Express DAC AREF input pin (cut the 3.3v trace first).
- The AREF pin requires a voltage bias of at least VCC (typically +3.3 volts) and no less than 1.0 volts, although it worked emperically down to 0.5 volts.
- The M4 DAC resolution is much greater than required to generate a sufficient ADSR envelope.
- Using the AREF pin only changed the DAC reference voltage, not the ADC.
- The reference voltage for both on-board DACs was supplied by the single AREF analog input pin essentially making the second DAC useless for other purposes.