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.

[参考译文] 将 Arduino Zero 与 ADS8688IDBTR 配合使用

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

https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/1054161/using-arduino-zero-with-ads8688idbtr

降级器、  

 

我使用的是采用 Arduino Zero 的 ADS8688IDBTR、它可以与以下代码配合使用、但每次上传代码时、每个通道的通道编号都会发生变化 :

 

 

#include "spi.h"

int CS=A3;
float ch =0;

void setup(){

引脚模式(CS、输出);
digitalWrite (CS、1);
SPI.begin();
SPI.setDataMode(SPI_MODE1);
SPI.setBitOrder(MSBFIRST);
SerialUSB.begin(9600);
Serial.begin(9600);
digitalWrite (CS、1);

void loop(){

for (int i =0;i<8;i++){
digitalWrite (CS、0);
SPI.transfer16 (0x00);//开始 Ch0采样
CH=SPI.transfer16 (0x00);//获取 Ch0转换
digitalWrite (CS、1);

ch=mapfloat (ch、32770、65535、0、10.15);
SerialUSB.print ("ch");
SerialUSB.print(i);
SerialUSB.print("=");

Serialusb.println (ch);

延迟(10);


延迟(1000);

float mapfloat (float x、float in_min、float in_max、float out_min、float out_max)

 返回(x - IN_MIN)*(OUT_max - OUT_MIN)/(IN_max - IN_MIN)+ OUT_MIN;

 

 

我尝试使用此库,但它不起作用::https://github.com/siteswapjuggler/ADS8688a

 

在这种情况下、如果有任何 C++代码适合此 IC 和 Arduino Zero、可以为任何实体提供帮助   

 

我还想知道在 读取通道之前对其进行初始化的寄存器命令顺序  

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

    您好

    您能否澄清"每个通道的通道编号变化"?  转换代码和通道编号之间是否不匹配? 如果是这种情况、 每次运行代码时的情况(代码与通道#)是否不同?  请分享一些/CS、SCLK、SDI 和 SDO 的示波器波形图、以验证接口上的时序。  

    我们没有特定微控制器的示例代码。 下面是一个常规 C 代码示例、 请检查源文件:

    http://www.ti.com/tool/ADS8688SW-LINUX

    没有特定的顺序来写入寄存器。  

    谢谢、此致、

    戴尔

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

    您好 

    我没有得到您的任何响应、因此我将关闭此主题。  如果问题未得到解决或您有任何其他问题、您可以打开新主题。 谢谢。

    此致、

    戴尔