请问,spi的速率多大可以?命令之间都要加短暂的延时吗??
在我读取寄存器数据的时候,读出来是:
ADS1259_REG[0] = 0x25
ADS1259_REG[1] = 0x8
ADS1259_REG[2] = 0xc0
ADS1259_REG[3] = 0x0
ADS1259_REG[4] = 0x0
ADS1259_REG[5] = 0x0
ADS1259_REG[6] = 0x0
ADS1259_REG[7] = 0x0
ADS1259_REG[8] = 0x40
但我写的时候是
ADS1259_WRITE(CMD_SDATAC);//Stop Read Data Continuous mode
ADS1259_WRITE(0X40);//write start from 00h
ADS1259_WRITE(0X08);//write 9 reg 8+1=9
ADS1259_WRITE(0X05);//00000101 RBIAS + spi timeout
//ADS1259_WRITE(0X01);//00000001 spi timeout
ADS1259_WRITE(0X14);//00011000 SINC2 + EXTREF
ADS1259_WRITE(0X03);//60sps , gate Convert mode
//OFC[2:0]
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X00);
//FSC[2:0]
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X40);
请问,为什么会这样,希望帮忙解答下~~
谢谢
ming li50749:
读取之前,我已经发命令了。
ADS1259_WRITE(CMD_SDATAC);//Stop Read Data Continuous modeADS1259_WRITE(0X20); //1st opcode, read from address 0x00ADS1259_WRITE(0X08); //2dn opcode, read 9 regs value
Amy Luo:
您好,
建议您用示波器测量一下SPI通信的波形,看下SPI通信时序是否有问题。
user6227663:
你好,你的问题解决了不,我最近也在调试ADS1259,遇到了类似的问题。能交流一下不?