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.

ads5404 test pattern输出为0的问题

Other Parts Discussed in Thread: ADS5404

为了测试FPGA与AD之间接口是否正确,将AD初始化为test pattern,HP模式置为0,但接收到的AD输出数据始终为0,可以确认FPGA接收数据没问题,应该是AD初始化问题,以下是我AD初始化的程序,哪位高手帮我看看初始化有问题没,为什么会造成整个现象,麻烦各位高手了。

void ads5404_Init(void)//ads5404初始化
{
uint32 setbuf[13];
uint16 i;
setbuf[0]=0x2cD2F0;//地址2c,软复位
setbuf[1]=0x008000;//地址0,spi口设置,四线、抽取滤波器禁用
setbuf[2]=0x018208;//地址1,禁止HP模式,用于接口测试,正常工作模式为0x01820a
setbuf[3]=0x020780;//地址2,过载阈值-超范围阈值数值15
setbuf[4]=0x0e0000;///地址e,禁用外部sync驱动
setbuf[5]=0x0f0010;//地址f,禁用外部sync驱动,参考电压1.25V
setbuf[6]=0x38ffdf;//地址38,HP模式2???????内部bias使能,SYNC输入禁止,LP模式1禁止
setbuf[7]=0x3ade1b;//地址3a,lvds设置
setbuf[8]=0x662fff;//地址66,lvds设置
setbuf[9]=0x672fff;//地址67,lvds设置
setbuf[10]=0x3c9554;//接口测试数据,555与aaa之间翻转,正常模式3c~3e均写0........................
setbuf[11]=0x3d2aa8;//接口测试数据,555与aaa之间翻转,正常模式3c~3e均写0.........................
setbuf[12]=0x3e1554;//接口测试数据,555与aaa之间翻转,正常模式3c~3e均写0.............................

f_ad_reset=0;//ad复位有效
delay(50000);
f_ad_reset=1;//ad复位信号无效
delay(50000);
for(i=0;i<13;i++)//设置ad寄存器
{
spi_reg_write(setbuf[i],TdAds5404);//TdAds5404为AD的SPI地址
}
spi_reg_write(0x034b18,TdAds5404);//启动自校准
spi_reg_write(0x1a4b18,TdAds5404);
//delay(500);
//spi_reg_write(0x030b18,TdAds5404);//启动自校准
//spi_reg_write(0x1a0b18,TdAds5404);
}