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.

[参考译文] CCS/LAUNCHXL-CC2640R2:如何在 Sensor Controller Studio 中从多个模拟引脚读取模拟值

Guru**** 2551300 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/578483/ccs-launchxl-cc2640r2-how-to-read-analog-values-from-more-than-one-analog-pin-in-sensor-controller-studio

器件型号:LAUNCHXL-CC2640R2

工具/软件:Code Composer Studio

在 Sensor Controller Studio 中、我使用 ADC 数据记录器示例从一个传感器读取模拟值。 我想从多个传感器获取模拟值。 为此、在任务资源中、我将引脚数更改为3 (通过查找表进行访问)。 但之后、我无法为 CCS 生成代码。 我还尝试使用数据结构成员(例如 cfg.pAuxoAXyz[])通过查找表进行访问。 我无法生成 CCS 代码、也无法运行程序。

如何从 SCS 中的各种传感器读取模拟值?

请提供使用查找表从各种引脚获取模拟值的解决方案(示例)..........................

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好 Naveen、

    尝试在 ADC 的不同模拟输入之间进行选择。

    U16 n = 0;
    adcSelectGpioInput (cfg.pAuxioAlsOutput[n]);
    N = 1;
    adcSelectGpioInput (cfg.pAuxioAlsOutput[n]);
    N = 2;
    adcSelectGpioInput (cfg.pAuxioAlsOutput[n]);