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.

ADS1299写寄存器问题2



我的初始化顺序是:

1、上电;

2、Set CLKSEL Pin = 1and Wait for Oscillatorto Wake Up;

3、Set PDWN = 1,Set  RESET = 1,Wait  for 1 s for Power-On Reset;

4、Issue Reset Pulse,Wait for 18 t s;

5、Send SDATAC,Command;

6、Use Internal Reference, Send Command :REG CONFIG3 E0h

与数据手册58页上的顺序一样,接下来开始设置采样速率,要用到 WREG CONFIG1 90h,我的写寄存器的程序是:

cs = 0;

while(drdy);

spi_send_single(0x41);

delay_us(2);

spi_send_single(0x00);

delay_us(2);

spi_send_single(0x90);

delay_us(2);

cs = 1;

cs = 0;

while(drdy);

spi_send_single(0x41);

delay_us(2);

spi_send_single(0x00);

delay_us(2);

spi_send_single(0x90);

delay_us(2);

cs = 1;

程序运行完成后,观察drdy引脚,有时可以变为16kHZ,有时还是维持片子复位完成后的250HZ,想知道这是为什么,看样本上的说明似乎写寄存器不需要drdy引脚,但若我按照样本38页的Figure 45来写程序的话,drdy波特率不会发生改变。而我上面的程序其实是重复了两遍,我试过如果只是用上面程序中的1遍,似乎永远写寄存器不成功,drdy波特率不会改变。

想知道这是什么原因,求专家帮忙解答,谢谢