Arduino nano R4 DAC external reference problem

Hi!

I have some problem with nano r4 dac. Even if I set the external reference, the output does not change. It looks like it still uses the 5V ps voltage as reference.
I tried 4,096V and 2,048. I use my rigol DP932 power supply for external reference voltage and I measure the voltage with Fluke 45 4&1/2 digit dmm.
Here is the code I use:

void setup() {

  analogWriteResolution(12);
  analogReference(AR_EXTERNAL);

}


void loop() {

  analogWrite(DAC, 4000);
  delay(5000);
  analogWrite(DAC, 2000);
  delay(5000);  

}

And I measure 5V and 2.5V on the output!
Did I mess up something?

First there's this:

and then there's this:

analogReference()

analogReference()

Last revision09/05/2025

Description

Configures the reference voltage used for analog input (i.e. the maximum >voltage that can be sensed).

It says nothing about analog output.

Thank You very much for reply! I saw the schematic but I thought that the DAC uses the same reference... But I was wrong.
There is no external DAC reference...
So I have to search some external DAC with external reference pin.

The DAC external reference is Vrefh not Vrefh0. Unfortunately it's not broken out on the R4 boards.