This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F6736A: MSP430F6736A 24位ADC的数据处理问题

Part Number: MSP430F6736A

我们主控使用的是MSP430F6736A,主要是看中了该芯片自带的24位ADC,该ADC在使用SD-24模式时,在编写ADC驱动时,ADC传出的数据被分为2个16位的数据,如何将其整合成一个有效的24位数据?麻烦帮忙看一下,谢谢。

  • Hi,
    Sorry for late reply. I think your question is:
    "we have selected MSP430F6976A for your system MCU for main controller. It is because there is a built-in sigma-delta ADC-24bit. When using SD-24 mode, ADC result data is saved in 2 16bit words. How to integrate them into valid 24bit data? "

    The answer is to define the ADC result variable to "unsigned long" data type, and move the ADC conversion data to the variable with twice operation. Please refer to the example code msp430f673xA_sd24b_06.c in the MSP430F6976A code example ZIP file (www.ti.com/.../slac693).

    unsigned long results;
    ......
    results = SD24BMEMH2; // Save CH2 results (clears IFG)
    results = (results << 16) | SD24BMEML2; // Concatenate lower and upper words

    Default ADC data format is Right-aligned, and offset binary. If you would like the data format to Left-aligned and Twos complement, please check the register setting of SD24ALGN and SD24DFx in the user guide.

    Thanks,
    Lixin
  •  I'll check with my customer if the issue can be solved.  Thank you very much.

  • Thanks for the feedback. If the issue is resolved, please help to click on the "Verify Answeer" button.

**Attention** This is a public forum