Go Down

Topic: DUE DAC output (Read 6498 times) previous topic - next topic

Adarsh_Verma

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


Grumpy_Mike

Well using
Code: [Select]
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:-
Code: [Select]
  analogWriteResolution(12);
in the setup.

Adarsh_Verma

Thanks, It worked.

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

Code: [Select]

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


But can one tell me what is the min and max voltage output by these pins, because i tried this code:
<snip>
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:
http://arduino.cc/forum/index.php/topic,139733.msg1134372.html#msg1134372
(Page 1033 of a similar datasheet)

-Chris

Grumpy_Mike

Quote
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

Adarsh_Verma

Got it.
Thanks for your Help  :smiley-mr-green:

Go Up