针对AD7771的使用我遇到了两个问题。
第一、我对AD7771进行了初始化,配置在寄存器模式下时,都会寄存器的值都是0x2000,手册上写的读回来8位头8位数据 头正好是0x20 但是数据应该是给寄存器赋的值,而我却都是0x00。[img]file:///C:\Users\lenovo\AppData\Roaming\Tencent\Users\244431382\tiM\WinTemp\RichOle\DGBCF%{6D@~DZNEB5HS[C[R.png[/img][img]file:///C:\Users\lenovo\AppData\Roaming\Tencent\Users\244431382\TIM\WinTemp\RichOle\_GX7)LQB]79]%EP0X[CSRQ9.png[/img]
下面是我的程序
void AD7771_Init(void)
{
uint8_t i=0;
uint16_t Regdata[101];
AD7771_Reset();
HAL_Delay(200);
AD7771_Register_Write(0x13, 0x80);
AD7771_Register_Write(0x08, 0x00);
AD7771_Register_Write(0x11, 0x24);
AD7771_Register_Write(0x15, 0x40);
AD7771_Register_Write(0x14, 0x20);
AD7771_Register_Write(0x60, 0x02); //SRC_N_MSB
AD7771_Register_Write(0x61, 0x00); //SRC_N_LSB
AD7771_Register_Write(0x62, 0x00); //SRC_IF_MSB
AD7771_Register_Write(0x63, 0x00); //SRC_IF_LSB
AD7771_Register_Write(0x64, 0x01);
for(i=0; i<0x65; i++)
{
Regdata = AD7771_Register_Read(i);
}
AD7771_Register_Write(0x13, 0x90);
}
|