Problem with DAC arduino DUE

Hey, i am using this program to test the DAC0 and DAC1 in my arduino DUE. DAC1 works properly (voltage from 0V until 2.5V) but DAC0 has a constant voltage around 0.100V. Anybody knows why and how can i fix it?
Thank you :slight_smile:
int value=0;

void setup()
{
analogWriteResolution(12);
Serial.begin(9600);
}

void loop()
{
analogWrite(DAC0, value );

value++;
delay(10);
if(value>4094)
value=0;

}

I don't know, but it's not unusual for a DAC not to go all the way to ground (zero V) or all the way to the positive power supply.

You might want to check the datasheet for the chip.

Do you have a load? A 1K resistor on the output (between the output and ground) might allow it to go lower, but that's just a wild guess.

...The digital outputs also don't usually go all the way to zero or Vcc. That's the beauty of digital. it doesn't have to as along as a zero is low-enough to be zero and a high is high-enough to be 1.

You can't fix it. That is how a lot of integrated DACs work.

You need to use a separate DAC chip.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.