您好!
我正在使用流量计、但我在读取 CONFIG1和 INT_STATUS 寄存器时遇到问题、但能够读取和写入所有其他寄存器、问题出在哪
读取寄存器不会将自动递增位设为高电平、那么问题就出在这里了。 向我推荐解决方案。。。?
此致、
Rashmi HM
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.
您好、Scott、
很抱歉,我迟到了回复,当我尝试读取寄存器时,无法写入和读取 CONFIG1和 INT_STATUS 寄存器,并且无法设置 START_MEAS 位...是否有任何特定的标准来设置 CONFIG1的 START_MEAS 位?
//写入 TDC 7200寄存器//
digitalWrite (SS、low);//禁用设备
SPI.begin();//唤醒 SPI 总线。
SPI.beginTransaction(SPISettings(8000000、MSBFIRST、SPI_MODE0));
//TDC 7200 REG 配置
writeRegister1 (0xC0、0xC3);
writeRegister1 (0xC1、0x44);
writeRegister1 (0xC2、0x00);
writeRegister1 (0xC3、0x07);
spi.endTransaction();
spi.end();
digitalWrite (SS、HIGH);
//读取寄存器//
SPI.begin();//唤醒 SPI 总线。
SPI.beginTransaction(SPISettings(8000000、MSBFIRST、SPI_MODE0));
digitalWrite (SS、low);//禁用设备
读取寄存器(0x80);
读取寄存器(0x81);
读取寄存器(0x82);
读取寄存器(0x83);
读取寄存器(0x85);
spi.endTransaction();
spi.end();
digitalWrite (SS、HIGH);
此致、
Rashmi HM