cancel
Showing results for 
Search instead for 
Did you mean: 

ADC to DAC problem

binarybee
Associate III

Hi guys, I have a problem with ADC conversion I would say. I put sine wave on ADC input and then I just transfer the value to DAC register, but the negative half of the sine wave is clipped.

The code is just this ( Inside HAL_ADC_ConvCpltCallback):

DAC1->DHR12R1 =*(uint32_t*)ADC_DMA_ADDRESS;

Here is the screenshot of ADC settings:0693W000006HJO0QAO.jpgHere how is the output signal clipped.

0693W000006HJNvQAO.jpg 

Thank for any ideas and Happy New Year :)

1 REPLY 1

Hello

Happy new year!

The accepted input voltage to an ADC input pin is from GND (0) to VDDA. Negative voltages inject current tp ADCIN pin and may damage the device. In this case you may use an OPAMP for signal conditioning.