微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 硬件电路设计 > TI模拟硬件电路设计 > ADS1259

ADS1259

时间:10-02 整理:3721RD 点击:

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

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

jihanbang1314@126.com

QQ:418525229

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

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

下面是一个列子

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的引脚,却什么都没有输出。请问是什么原因

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top