⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ad7705使用两点注意事项(附初始化程序)--edmundzh的笔记.htm

📁 有关于AD7705的众多详细资料
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0056)http://blog.21ic.com/user1/2851/archives/2006/31781.html -->
<HTML><HEAD><TITLE>AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记</TITLE>
<META http-equiv=Content-Language content=zh-CN>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3395" name=GENERATOR>
<META content=edmundzh,edmund name=author>
<META content=AD7705使用两点注意事项(附初始化程序) name=keyword>
<META 
content="近日项目中应用了AD7705,作为一款16位的AD,非常适合应用在高精度慢速采集的场合。我在项目中实现温度分辨率0.01度,给PID控制精度提高提供了条件。&nbsp; " 
name=description><LINK title=RSS href="/user1/2851/rss2.xml" 
type=application/rss+xml rel=alternate><LINK 
href="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/OblogUserDefault4.css" 
type=text/css rel=stylesheet>
<SCRIPT src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/main.js" 
type=text/javascript></SCRIPT>
</HEAD>
<BODY><SPAN id=gg_usertop></SPAN><LINK 
href="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/css.css" type=text/css 
rel=stylesheet><LINK href="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/001.css" 
type=text/css rel=stylesheet>
<DIV id=top></DIV>
<DIV id=mainbox>
<DIV id=main>
<DIV id=mainlfet>
<DIV id=mainlfet01>
<H3>分类</H3>
<DIV id=subject>载入中...</DIV>
<H3>日历</H3>
<DIV id=calendar>载入中...</DIV>
<H3>登陆</H3>
<DIV>
<DIV id=ob_login>载入中...</DIV></DIV>
<H3>最新文章</H3>
<DIV id=newblog>载入中...</DIV>
<H3>回复</H3>
<DIV id=newmessage>载入中...</DIV>
<H3>站点统计</H3>
<DIV id=info>载入中...</DIV>
<DIV id=aobomusic></DIV>
<H3>友情链接</H3>
<DIV id=links></DIV>
<DIV id=gg_userlinks></DIV></DIV></DIV>
<DIV id=mainright>
<DIV id=mainright01></DIV>
<DIV id=mainblog>
<DIV id=topic>AD7705使用两点注意事项(附初始化程序)<SPAN class=time>2006-11-18 
9:10:00</SPAN></DIV>
<DIV id=text><SPAN id=ob_logd31781></SPAN>
<DIV>近日项目中应用了AD7705,作为一款16位的AD,非常适合应用在高精度慢速采集的场合。我在项目中实现温度分辨率0.01度,给PID控制精度提高提供了条件。</DIV>
<DIV>但开始调试时,也遇到了一些麻烦,主要有两点:</DIV>
<DIV>1,初始化:</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
如果AD7705复位引脚直连VCC,最好在初始化程序中加入初始化序列,不然ready信号不会输出。</DIV>
<DIV>2,输入范围</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
如果AD7705采集单端信号,则输入必须在0到VDD之间,而不可以超出或为负,如果一个输入为负,则另一个输入会有灌入电流的现象,芯片无法正常运行。</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>附初始化程序:</DIV>
<DIV>/*<BR>*********************************************************************************************************<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
InitAD7705<BR>*<BR>* Description : init 
ad7705<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>* Arguments&nbsp;&nbsp; : 
none<BR>*********************************************************************************************************<BR>*/<BR>void 
InitAD7705 (void) 
{<BR>&nbsp;INT8U&nbsp;i;<BR>&nbsp;INT8U&nbsp;temp;<BR>&nbsp;OS_CPU_SR 
cpu_sr;</DIV>
<DIV>&nbsp;DDRB |= 0x07;// Mosi, sck, ss<BR>&nbsp;DDRB &amp;= ~(1 &lt;&lt; 
3);//Miso<BR>&nbsp;<BR>&nbsp;PORTB |= 1 &lt;&lt; 1;//sck high<BR>&nbsp;PORTB |= 
1 &lt;&lt; 2;//mosi high<BR>&nbsp;PORTB &amp;= ~ (1 &lt;&lt; 0); // ss low</DIV>
<DIV>&nbsp;for (i=0;i&lt;50;i++) // AD7705复位<BR>&nbsp;{<BR>&nbsp;&nbsp;PORTB 
&amp;= ~(1 &lt;&lt; 1);<BR>&nbsp;&nbsp;PORTB |= 1 &lt;&lt; 1;<BR>&nbsp;} </DIV>
<DIV>&nbsp;SpiInit();</DIV>
<DIV><BR>&nbsp;//PutChar1(0x5a);<BR>&nbsp;temp = PutCharSpi(0x20);//next is 
clock<BR>&nbsp;temp = PutCharSpi(0x05);//60hz<BR>&nbsp;temp = 
PutCharSpi(0x10);//next is setup<BR>&nbsp;temp = 
PutCharSpi(0x44);//<BR>&nbsp;while ((PIND &amp; 0x01) == 1);</DIV>
<DIV>&nbsp;temp = PutCharSpi(0x21);//next is clock<BR>&nbsp;temp = 
PutCharSpi(0x05);//60hz<BR>&nbsp;temp = PutCharSpi(0x11);//next is 
setup<BR>&nbsp;temp = 
PutCharSpi(0x44);//0x44比0x46要准确一些,可能是因为缓冲<BR>&nbsp;//不适合于变化的输入。比如模拟开关,以及通道切换<BR>&nbsp;//带来的影响,如果只有一路<BR>&nbsp;//稳定的输入,可以就不会有问题<BR>&nbsp;//FSYNC&nbsp;不能为1,不然,似乎rdy线不会变低<BR>&nbsp;while 
((PIND &amp; 0x01) == 1);<BR>&nbsp;//PutChar1(0xA5);<BR>&nbsp;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV id=footer><A 
href="http://blog.21ic.com/user1/2851/archives/2006/31781.html#">阅读全文<SPAN 
id=ob_logreaded></SPAN></A> | <A 
href="http://blog.21ic.com/user1/2851/archives/2006/31781.html#cmt">回复(4)</A> 
<SPAN id=ob_logm31781></SPAN>| <A 
href="http://blog.21ic.com/showtb.asp?id=31781" target=_blank>引用通告<SPAN 
id=ob_tbnum></SPAN></A> | <A 
href="http://blog.21ic.com/user_post.asp?logid=31781" target=_blank>编辑</A></DIV>
<DIV id=morelog>
<UL>
  <LI>上一篇:<A 
  href="http://blog.21ic.com/user1/2851/archives/2006/24887.html">回归</A> 
  <LI>下一篇:<A 
  href="http://blog.21ic.com/user1/2851/archives/2007/33659.html">不要忘了从专利局获得信息!</A> 
  </LI></UL></DIV>
<DIV id=topic>Re:AD7705使用两点注意事项(附初始化程序)<A name=27489></A><SPAN class=time><SPAN 
id=t_27489>2007-7-13 10:48:00</SPAN></SPAN></DIV>
<DIV id=text><IMG class=ob_face height=48 alt=游客(游客) 
src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/ico_default.gif" width=48 
align=absMiddle><SPAN id=c_27489>请教一下SpiInit();具体是什么?<BR>不胜感激!!</SPAN></DIV>
<DIV id=footer>个人主页 | <A href="javascript:reply_quote('27489')">引用</A> | <A 
href="http://blog.21ic.com/user1/2851/archives/2006/31781.html#top">返回</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=del&amp;id=27489" 
target=_blank>删除</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=modify&amp;re=true&amp;id=27489" 
target=_blank>回复</A></DIV>
<DIV id=topic>Re:AD7705使用两点注意事项(附初始化程序)<A name=27443></A><SPAN class=time><SPAN 
id=t_27443>2007-7-11 15:09:00</SPAN></SPAN></DIV>
<DIV id=text><A 
href="http://blog.21ic.com/go.asp?url=http://hi.baidu.com/boly0223" 
target=_blank><IMG class=ob_face height=48 alt=boly0223 
src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/ico_default.gif" width=48 
align=absMiddle></A><SPAN 
id=c_27443>你好,我们做课程设计的时候也遇到了这个问题,不知道怎么解决,看了你的帖子但是程序不太明白,希望你能指教!!</SPAN></DIV>
<DIV id=footer><A 
href="http://blog.21ic.com/go.asp?url=http://hi.baidu.com/boly0223" 
target=_blank>个人主页</A> | <A href="javascript:reply_quote('27443')">引用</A> | <A 
href="http://blog.21ic.com/user1/2851/archives/2006/31781.html#top">返回</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=del&amp;id=27443" 
target=_blank>删除</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=modify&amp;re=true&amp;id=27443" 
target=_blank>回复</A></DIV>
<DIV id=topic>Re:AD7705使用两点注意事项(附初始化程序)<A name=25374></A><SPAN class=time><SPAN 
id=t_25374>2007-5-9 22:50:00</SPAN></SPAN></DIV>
<DIV id=text><IMG class=ob_face height=48 alt=xiaoqiang(游客) 
src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/ico_default.gif" width=48 
align=absMiddle><SPAN 
id=c_25374>我最近也想选用这个AD,想请教两个问题:<BR>1.这个器件大概价格是多少?<BR>2.16位的转换最长是多长时间?<BR>希望百忙给矛指点一二,不胜感激.</SPAN></DIV>
<DIV id=footer>个人主页 | <A href="javascript:reply_quote('25374')">引用</A> | <A 
href="http://blog.21ic.com/user1/2851/archives/2006/31781.html#top">返回</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=del&amp;id=25374" 
target=_blank>删除</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=modify&amp;re=true&amp;id=25374" 
target=_blank>回复</A></DIV>
<DIV id=topic>Re:AD7705使用两点注意事项(附初始化程序)<A name=22402></A><SPAN class=time><SPAN 
id=t_22402>2007-2-3 14:40:00</SPAN></SPAN></DIV>
<DIV id=text><A href="http://blog.21ic.com/go.asp?url=http://HELP" 
target=_blank><IMG class=ob_face height=48 alt=小管(游客) 
src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/ico_default.gif" width=48 
align=absMiddle></A><SPAN 
id=c_22402>你好撒/<BR>能不能把你的应用电路和程序给我,我现在也在搞恒温水槽,难啊<BR>我的E-MAL:gonzales12@163.com</SPAN></DIV>
<DIV id=footer><A href="http://blog.21ic.com/go.asp?url=http://HELP" 
target=_blank>个人主页</A> | <A href="javascript:reply_quote('22402')">引用</A> | <A 
href="http://blog.21ic.com/user1/2851/archives/2006/31781.html#top">返回</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=del&amp;id=22402" 
target=_blank>删除</A> | <A 
href="http://blog.21ic.com/user_comments.asp?action=modify&amp;re=true&amp;id=22402" 
target=_blank>回复</A></DIV>
<DIV id=form_comment>
<DIV id=gg_usercomment></DIV><A name=cmt></A>
<DIV class=title>发表评论:</DIV>
<FORM id=commentform name=commentform onsubmit="return Verifycomment()" 
action=/savecomment.asp?logid=31781 method=post>
<DIV class=d1><LABEL>昵称:<INPUT id=UserName maxLength=20 
name=UserName></LABEL></DIV>
<DIV class=d2><LABEL>密码:<INPUT id=Password type=password maxLength=20 
name=Password> (游客无须输入密码)</LABEL></DIV>
<DIV class=d3><LABEL>主页:<INPUT id=homepage maxLength=50 size=42 value=http:// 
name=homepage></LABEL></DIV>
<DIV class=d4><LABEL>标题:<INPUT id=commenttopic maxLength=50 size=42 
value=Re:AD7705使用两点注意事项(附初始化程序) name=commenttopic></LABEL></DIV>
<DIV class=d5><INPUT id=edit type=hidden name=edit> 
<DIV id=oblog_edit>载入中...</DIV></DIV>
<DIV class=d6><SPAN id=ob_code></SPAN><INPUT onclick='oblog_edittext.createTextRange().execCommand("Copy");' type=submit value=&nbsp;提&nbsp;交&nbsp;></DIV></FORM></DIV></DIV></DIV></DIV></DIV>
<DIV id=bottom></DIV><SPAN id=gg_userbot></SPAN>
<SCRIPT src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/200611.htm"></SCRIPT>

<SCRIPT src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/count.htm"></SCRIPT>

<SCRIPT 
src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/commentedit.htm"></SCRIPT>

<SCRIPT 
src="d:\我的文档\桌面\AD转换\AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files\count(1).htm"></SCRIPT>

<SCRIPT src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/login.htm"></SCRIPT>

<SCRIPT src="AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files/ShowXml.htm"></SCRIPT>

<SCRIPT 
src="d:\我的文档\桌面\AD转换\AD7705使用两点注意事项(附初始化程序)--edmundzh的笔记.files\count(2).htm"></SCRIPT>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -