cancel
Showing results for 
Search instead for 
Did you mean: 

D/A Conversion Not as Expected. Gain seems to be greater than 1?

MHenz
Associate II

I am relatively new to ST. I am using the STM32L476VE. I LOVE this chip.

But, I am trying to use the D/A converter. To test, I created a buffer that contains 512 values ranging from 0 to 4095. The values are representative of a single sine wave cycle. The sine wave is centered about a value of 2047. So, the table starts at 2047 . . . peaks at 4095 . . . goes down to 0 and finally back to 2047. These values aren't exact, but close enough. When I generate the sine wave (using 12 bit right alignment), the sine wave is generated, but the top 1/3rd of the waveform is clipped. I expected a sinusoidal output from 0 to 2.5V. Instead, the values range from 0 to 2.5V, but the top 3rd of the waveform is clipped. It is as though the gain of the D/A is not set to 1. Can the gain of the D/A be set programmatically? If so . . . how? Any other ideas?

Thank you for your help.

All the best,

Max

0 REPLIES 0