TI中文支持网
TI专业的中文技术问题搜集分享网站

ADS1259

我在用SPI口操作ADS1259时,初始化正确,但是在读寄存器时,第一个寄存器和第二个寄存器无法读上来,其它的寄存器都可以读上来,并正确.

请问是什么原因,最后发我个例程,

jihanbang1314@126.com

QQ:418525229

Robin Feng:

读取操作方法是否正确?如下

RREG: Read from Registers

Description: These opcode bytes read register data. The Register Read command is a two-byte opcode

followed by the output of the register data. The first byte contains the command opcode and the register address.

The second byte of the opcode specifies the number of registers to read – 1.

First opcode byte: 0010 rrrr, where rrrr is the starting register address.

Second opcode byte: 0000 nnnn, where nnnn is the number of registers to read.

The 17th SCLK rising edge of the operation clocks out the MSB of the first register

Robin Feng:

回复 Robin Feng:

下面是一个列子

weijie yu:

回复 Robin Feng:

void ads1259_init()

{

ADS1259_Write_Byte(SDATAC); //Send the SDATAC command

ads1259_write(CONFIG1,0x50);

ADS1259_Write_Byte(START); delay_ms(10);

}

main()

{

ADS1259_init(); while(1) { ADS1259_Read_from_Rg(0x00); delay_ms(1); ADS1259_Read_from_Rg(0x01); delay_ms(1); ADS1259_Read_from_Rg(0x02); delay_ms(1); ADS1259_Write_Byte(RDATA); ADS1259_Read_2Word();}

这是我对ads1259进行的初始化和主函数,可是我用示波器监控ADS1259的引脚,却什么都没有输出。请问是什么原因

赞(0)
未经允许不得转载:TI中文支持网 » ADS1259
分享到: 更多 (0)