jyl518-283289 发表于 2018-12-19 09:13:44

STM32控制AD7190,RDY不拉低

事情是这样的
使用STM32F030控制24位ad    AD7190,
上电后,ad7190能够被正常初始化,读出寄存的的值均为初始值
也能将值写入AD7190(验证过),

但是,AD7190 的RDY一直是H,怎么都无法让RDY自动变为L,

请用过的大神,出出主意,指点迷津!!!

wudianjun2001 发表于 2018-12-19 10:13:22

我们没用RDY引脚去判断,直接定时去读的

wudianjun2001 发表于 2018-12-19 10:13:58

uint32_t AD_Read (void)
{
        uint8_t buf;
        uint32_t Result = 0;
       
        buf = 0x58;                                                                                //下一步要读数据寄存器
        Write_AD7190(1,buf);                                                                //写通讯寄存器
        Read_AD7190(3,buf);                                                                        //读数据寄存器
        Result = (((uint32_t)buf) << 16) | (((uint32_t)buf) << 8) | buf;

        return (Result);
}

jyl518-283289 发表于 2018-12-19 10:50:10

wudianjun2001 发表于 2018-12-19 10:13
uint32_t AD_Read (void)
{
        uint8_t buf;


我读状态寄存器值,全是0x00 00 00 80,读数据寄存器全是0,
像是没有启动转换

wudianjun2001 发表于 2018-12-19 11:25:01

jyl518-283289 发表于 2018-12-19 10:50
我读状态寄存器值,全是0x00 00 00 80,读数据寄存器全是0,
像是没有启动转换 ...

可能初始化程序有问题,再检查下吧

jyl518-283289 发表于 2019-1-2 13:07:45

wudianjun2001 发表于 2018-12-19 11:25
可能初始化程序有问题,再检查下吧

初始化AD7190时,具体初始化哪此,有分顺序步骤吗?能否稍微详细说明下

jyl518-283289 发表于 2019-1-4 09:13:38

问题已解决,谢谢各位的支持!!!

toofree 发表于 2019-1-4 09:24:41

jyl518-283289 发表于 2019-1-4 09:13
问题已解决,谢谢各位的支持!!!

既然解决了,那么就总结一下原因和解决方法吧。

jyl518-283289 发表于 2019-1-5 11:11:10

是该总结一下:loveliness:

要注意SYNC引脚,手册对该引脚的说明如下:
Logic input that allows for synchronization of the digital filters and analog modulators when using
multiple AD7190 devices. While SYNC is low, the nodes of the digital filter, the filter control logic, and the
calibration control logic are reset and the analog modulator is held in its reset state. SYNC does not affect
the digital interface but does reset RDY to a high state if it is low. SYNC has a pull-up resistor internally to DVDD.

所以常规使用情况下,SYNC要置高,若置低,则RDY始终为高,不会拉低,故读状态寄存器也没有转换后的数据。实际项目情况,我读到的AD值跳动量在个位数,很是理想。:P
页: [1]
查看完整版本: STM32控制AD7190,RDY不拉低