cancel
Showing results for 
Search instead for 
Did you mean: 

Why DAC make 0.12[V] when I set it be 0

SKim.1761
Associate III
HAL_DAC_Start_DMA(&hdac, DAC_CHANNEL_1, (uint32_t*)setdac, 1, DAC_ALIGN_12B_R);

HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, setdacvalue);

The first problem was when I changed setdac which points value that DMA buffer(?) 

It doesn't work so I add second code it works when i set 4095 on there it says 2.90[V] but

when i set 0 on there it says 0.12[V]..

and the code generation setting is going below picture

0690X00000BvbglQAB.png

As you can see that I set DMA and OUT1 as DAC operating conditions

It works properly except one stuff that when I set DAC value as 0 the pin says 0.12[V] ..

Have no idea how to make that pin to be 0[V]

That's all Thankyou

5 REPLIES 5

Read the datasheet, this is probably inherent DAC limitation.

JW

SKim.1761
Associate III

But... It's .... so.. Ok..

SKim.1761
Associate III

Data sheet seems like saying "DAC_O UT min(2) Lower DAC_OUT voltage with buffer ON's value is higher than 0.2[V]"

So there's nothing we can do with only using code..?

I captured the parts of pointing DAC out minimum

0690X00000Bvc2rQAB.png

>So there's nothing we can do with only using code..?

That's the case, face it.

I know it's a disappointment for you now, but, on the other hand, think of it, this is a rather complex primarily digital chip, where analog is really just of a secondary importance and, if you'd been designing chips, you'd think of it as a miracle that it works this well at all, more than a shortcoming.

If for some reason, you'd need one solid zero but then you'd not care that the next value is not in the millivolt range, you could go with the trick of setting the pin for that particular value as a digital output.

JW

Uwe Bonnes
Principal III

If you really need 0 V out, use the DAC unbuffered and buffer DAC out with a buffer with a negative rail.