system
March 18, 2013, 1:40pm
1
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.
system
March 19, 2013, 10:01am
3
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:
chriskner: I(OH) (ISource) for pins in Group 2 (which include the DAC), is -3mA. I(OL) (ISink) for pins in Group 2 (which include the DAC), is 6mA. That is the spec for the digital output stage of the PIO pins, not the analog stage of the DAC....
(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
system
March 20, 2013, 10:11am
6
Got it.
Thanks for your Help