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.

[参考译文] ADS1263:SPI寄存器更新

Guru**** 2398765 points
Other Parts Discussed in Thread: ADS1263, ADS1262

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

https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/651358/ads1263-spi-registers-update

部件号:ADS1263
在“线程: ADS1262”中讨论的其他部件

大家好。

1.开机后读寄存器时,我有默认值  

模式2 0x04

INPMUX 0x01

IDACMUX 0xbb

2.渗出后写功能:

void ads1263_group1_wreg (void)

volatile unsigned char d,r;
volatile unsigned char I;

r =3;//mode0寄存器

ads1263_cs_0;
//第一个字节-操作码1
//d = 0x2a;//rreg (0010-0x2) from IDAC0 reg (0x0a)
D = 0x40;
d |= r;
ads1263_write_byte(d);


//第二个字节-操作码2
//d = 0x2a;//rreg (0010-0x2) from IDAC0 reg (0x0a)
d = 0x20;
d |= r-1;
ads1263_write_byte(d);


//数据到regs
ads1263_write_byte(0x10);//mode0
ads1263_write_byte(0x00);//Mode1
ads1263_write_byte(0x05);//mode2
ads1263_write_byte(0x67);//inpmux
ads1263_write_byte(0x00);//offcal0
ads1263_write_byte(0x00);//offcal1.
ads1263_write_byte(0x00);//offcal2.
ads1263_write_byte(0x00);//fscal0
ads1263_write_byte(0x00);//fscal1.
ads1263_write_byte(0x40);//fscal2
ads1263_write_byte(0x3a);//idacmux
ads1263_write_byte(0x66);//idacmag
ads1263_write_byte(0x00);//refmux
ads1263_write_byte(0x00);//tdacp


ads1263_SCLK_0;
ads1263_cs_1;

}

在阅读后-

Mode2 0x05 -更改正常

INPMUX 0x01 -未更改-错误

IDACMUX 0xbb -未更改-错误

我做错了什么?

谢谢你

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

    第二个字节(opcode 2)看起来不正确....要写入寄存器03h (MODE0)到10h (TDACP ),总共14个寄存器,您需要发送0x43 0x0D,其中0x0D +1 = 14。

    目前,通过发送0x43 0x22,0x22被0x1F屏蔽(因为它超出寄存器地址范围),ADS1262将此命令解释为0x43 0x02,因此它只会写入总共3个寄存器。 在您的代码中,我想您在计算opcode 2的值时忘记了更新"r"的值。

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

    谢谢!
    现在它开始工作了
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    很高兴能为你提供帮助。 如果您有任何其他问题,请告知我们!

    此致,
    Chris