DAC max output voltage

I would like to use the DAC for its basic purpose: getting a CC voltage.

I have configured the DAC to 8-bit resolution.

Setting the DAC's value to 255 I get an output voltage of ~2.76/2.77 V (5V = ~4.85V).

Is the DAC using an internal reference instead of the 5V? Can I change it? Which is the DAC's max output voltage and current?

Thx

int value = 0;  

void setup() {
  Serial.begin(115200);
  analogWriteResolution(8);
  analogWrite(DAC, value);
}

void loop() {
  if (Serial.available() > 0) {
    value = Serial.parseInt();

    Serial.println("DAC Value " + String(value));
    analogWrite(DAC, value);
  }
  delay(500);
}

Please change the title - ADC and DAC is not the same....

ADC doesn't have "output voltage"

Thank you for reporting the typo. I am aware of the difference between ADC and DAC.

See the datasheet
https://www.renesas.com/eu/en/document/dst/renesas-ra4m1-group-datasheet?r=1054146

you may need to refer to the hardware datasheet - chapter 36
https://www.renesas.com/eu/en/document/mah/renesas-ra4m1-group-users-manual-hardware?r=1054146

Do you know what the reference voltage is?

1 Like

fab64,

Using your sketch, I get a value of 4.66V.
For me the "5V" is 4.68V.

Hi John,

You are right. I have tried again and I now get the right values (4.79V @5V=4.81V).

In my previous test, I connected a LED to the DAC output trough a too low resistor (330 ohm, instead of 10k) by mistake. I hardly see the colors so I use marked boxes to keep resistors and clearly that resistor was in the wrong box.

Thx

I'm color blind (red green) so I always check the value with a dmm.

You didnt mention you had something already conected to the DAC output!