DUE DAC output

Hello Everyone,

I am new to Arduino and hence, new to everything.
So can anyone please tell How to use 2 of the DAC pins present in Arduino Due, can they provide constant voltage output, if yes, then How ????

Sorry if this Question is a silly one but please, do guide.

Thank you

Well using

analogWrite(DAC0, value );

will do it.
Guess how you access DAC1.

This will give you 8 bits resolution. To get the full 12 bits use:-

  analogWriteResolution(12);

in the setup.

Thanks, It worked.

But can one tell me what is the min and max voltage output by these pins, because i tried this code:

int value=0;

void setup() 
{
  analogWriteResolution(12);
}

void loop() 
{
analogWrite(DAC1, value );  
value++;
delay(10);
if(value>4094)
value=0;
}

And the output didn't exceed 2.8 V (Due's Pins Support I/O up to 3.3V).

Thank you

adarshverma96:
But can one tell me what is the min and max voltage output by these pins, because i tried this code:

And the output didn't exceed 2.8 V (Due's Pins Support I/O up to 3.3V).

This is expected.

See stimmer's response on February 26 here:

(Page 1033 of a similar datasheet)

-Chris

But can one tell me what is the min and max voltage output by these pins, because i tried this code:

yes that is the value I get from that code as well.
In fact you will see it does not go lower than 0.58V so the actual range is only 2.24V

Got it.
Thanks for your Help :grin: