Are ADC actually encoders or decoders

Forum: Microcontrollers and Digital Electronics Initialize CODEC / DC offset from ADC is incorrect

For weeks I have been trying to put an audio codec (Cirrus logic CS4272 into operation and slowly go crazy. Please give me a few thoughts. The problem is: DC offset after initialization is always too low. What has to be: 0VA => 0x00000000 2.5VA => 0x80000000 5VA => 0xFFFFFFFF I.e. I have to add 2.5V (VCOM) to ADC inputs with an analogue circuit. All analog circuits are built according to the data sheet and work correctly. The ADC inputs from the CODEC are actually 2.5V. So the stupid thing has to give me about 0x80000000 (2.5V) after the init. But it gives me digital values ​​equivalent to ~ 0.5V. This codec has one bit with which you can deactivate the high-pass filter at some point and save the current offset value. Lt. Data sheet should be done after 2s after initialization. It is not clear to me what value is stored when I set this bit. And secondly, why it doesn't automatically settle to the middle value when the high-pass filter is activated and why I should deactivate the high-pass filter. The change works. A sine wave with 0.5V amplitude is applied to the sample and it is converted. So the only problem seems to be incorrect DC offset. Do you have any inputs where I can still search? :(

: Edited by user

Solocan Z. wrote:> What has to be: >> 0VA => 0x00000000> 2.5VA => 0x80000000> 5VA => 0xFFFFFFFF Can you show from which description of the data sheet you derive this assignment? I read the following there: The full scale input voltage range of your ADC is 1.13 * VA, so for you probably 1.13 * 5V = 5.65V. But this is the peak-peak value for the differential input. The measuring range is from -2.8V to + 2.8V. And the digital signal is not unipolar but signed (in two's complement). Solocan Z. wrote:> The ADC inputs from the CODEC are> actually 2.5V. please be more specific: what is Ain +, what is Ain- and what voltage does Vcom have?

Achim S. wrote:> please be more specific: what is Ain +, what is Ain- and what> voltage does Vcom have? Oh yes, and the additional question: what is the digital value (which you interpret as 0.5V)?

Achim S. wrote:> And the digital signal is not unipolar but has a signed> (in two's complement). You really helped me a lot! Thanks alot! I stood on the hose forever and was too blind to read it, although I thought there was something wrong with the data format. So it was all right. Only I interpreted the digital values ​​in a unipolar way more stupidly. Just interpret it as signed and everything is correct. @Achim S., send me your address, I'll send you a small present :)

Write an answer

Providing an email address is voluntary. If you would like to be automatically informed by e-mail about replies to your post, please log in.

Important rules - read first, then post!

  • Use upper and lower case
  • Do not insert longer source code in the text, but as a file attachment

Formatting (more information ...)

  • [c] C code [/ c]
  • [code] code in other languages, ASCII drawings [/ code]
  • [math] Formula in LaTeX syntax [/ math]
  • [[Title]] - Link to article
  • Insert reference to another post: right-click on the post title,
    "Copy address" and paste it into the text