1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
用AD7792测四线制铂电阻,但是测出来的值一直为0,有没有哪位大佬帮忙看看哪里有问题,谢谢
Resettime=32; CLK_H; CS_L; MOSI_H; while(ResetTime--) //超过连续32个周期为高电平即复位 { CLK_L; delay_us(200); CLK_H; delay_us(200); } delay_us(500); AD7792WriteByte(WriteConfReg); //configuration register AD7792WriteByte(0x12);//单极性,增益Gain 4 AD7792WriteByte(0x90);//internal Reference,带缓冲 while(1) { AD7792WriteByte(WriteIOReg);//IO register AD7792WriteByte(0x03); AD7792WriteByte(WriteModeReg);//Mode Register AD7792WriteByte(0x20);//单次转换 AD7792WriteByte(0x0A);//inter 64 kHZ clock.internal clock is not available at the clk pin. AD7792WriteByte(ReadStateReg);//write to Communication register.The next step is to read from Status register. status = AD7792Read(8); while((status&0x80) == 0x80) //wait for the end of convertion by polling the status register RDY bit { AD7792WriteByte(ReadStateReg);//write to Communication register.The next step is to read from Status register. status = AD7792Read(8); UARTprintf("status:%xn", status); } AD7792WriteByte(ReadDataReg); //write to Communication register.The next step is to read from Data register. AD7792_Data = AD7792Read(16); UARTprintf("V:%dn", AD7792_Data); |
|
相关推荐
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1146 浏览 0 评论
飞凌嵌入式ElfBoard ELF 1板卡-mfgtools烧录流程介绍之烧写所需镜像
1225 浏览 0 评论
飞凌嵌入式ElfBoard ELF 1板卡-mfgtools烧录流程之烧写方法
675 浏览 0 评论
飞凌嵌入式ElfBoard ELF 1板卡-内核编译之初次编译
1019 浏览 0 评论
飞凌嵌入式ElfBoard ELF 1板卡-内核源代码的目录结构和文件说明
937 浏览 0 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 12:40 , Processed in 0.674311 second(s), Total 71, Slave 55 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号