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

📄 时钟芯片iids1302.htm

📁 输液控制这是很好的资料如果你想学请不要错过
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0041)http://www.zwmcu.com/news/details_148.htm -->
<HTML XMLNS:V XMLNS:O><HEAD><TITLE>时钟芯片DS1302及其在数据记录中的应用 === 紫微单片机工作室</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="时钟芯片IIDS1302.files/css.css" type=text/css rel=stylesheet>
<STYLE type=text/css>.text {
	FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 22px; TEXT-DECORATION: none
}
BODY {
	BACKGROUND-COLOR: #cccccc
}
.style4 {
	FONT-SIZE: 12px; COLOR: #000000
}
.style10 {
	FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #3d6f90
}
.style9 {
	FONT-SIZE: 14px; COLOR: #3d6f90
}
.style11 {
	FONT-SIZE: 12px
}
</STYLE>

<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<TABLE height=58 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
        <TBODY>
        <TR>
          <TD width=179 background=时钟芯片IIDS1302.files/index_02.jpg 
            height=58><IMG height=58 alt=紫微单片机 
            src="时钟芯片IIDS1302.files/index_01.jpg" width=169></TD>
          <TD vAlign=bottom align=middle width=30 
          background=时钟芯片IIDS1302.files/index_02.jpg><A class=bar 
            href="http://www.zwmcu.com/index.htm">首页</A><BR></TD>
          <TD width=10 background=时钟芯片IIDS1302.files/index_02.jpg><IMG 
            height=58 alt="" src="时钟芯片IIDS1302.files/index_04.jpg" width=6></TD>
          <TD vAlign=bottom align=middle width=140 
          background=时钟芯片IIDS1302.files/index_02.jpg><A class=bar 
            href="http://www.zwmcu.com/list_pic.htm">单片机基础教程(学习)</A><BR></TD>
          <TD width=10 background=时钟芯片IIDS1302.files/index_02.jpg><IMG 
            height=58 alt="" src="时钟芯片IIDS1302.files/index_04.jpg" width=6></TD>
          <TD vAlign=bottom align=middle width=141 
          background=时钟芯片IIDS1302.files/index_02.jpg><A class=bar 
            href="http://www.zwmcu.com/list_pic_1.htm">单片机实用技术(提高)</A></TD>
          <TD width=8 background=时钟芯片IIDS1302.files/index_02.jpg><IMG 
            height=58 alt="" src="时钟芯片IIDS1302.files/index_04.jpg" width=6></TD>
          <TD vAlign=bottom align=middle width=110 
          background=时钟芯片IIDS1302.files/index_02.jpg><A class=bar 
            href="http://www.zwmcu.com/list_qx.htm">常用器件资料</A></TD>
          <TD width=8 background=时钟芯片IIDS1302.files/index_02.jpg><IMG 
            height=58 alt="" src="时钟芯片IIDS1302.files/index_04.jpg" width=6></TD>
          <TD vAlign=bottom align=middle width=84 
          background=时钟芯片IIDS1302.files/index_02.jpg><A class=bar 
            href="http://www.zwmcu.com/list_pic_2.htm">PIC单片机</A></TD>
          <TD width=6 background=时钟芯片IIDS1302.files/index_02.jpg><IMG 
            height=58 alt="" src="时钟芯片IIDS1302.files/index_04.jpg" width=6></TD>
          <TD vAlign=bottom align=middle width=40 
          background=时钟芯片IIDS1302.files/index_02.jpg><A class=bar 
            href="http://www.zwmcu.com/bbs">论坛</A></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD></TR></TBODY></TABLE>
<TABLE height=28 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
        <TBODY>
        <TR>
          <TD width=234 height=28><IMG height=28 alt=单片机 
            src="时钟芯片IIDS1302.files/index_06.jpg" width=234></TD>
          <TD width=544 background=时钟芯片IIDS1302.files/index_08.gif>
            <MARQUEE onmouseover=stop(); onmouseout=start(); scrollAmount=2 
            scrollDelay=1><IMG src="时钟芯片IIDS1302.files/DOG.gif"><A 
            style="COLOR: #ffffff" 
            href="http://www.zwmcu.com/zxdt_details.asp?id=21">无位置传感器无刷控制器开发圆满成功!欢迎有识之士与我们洽谈合作!</A> 
            <SPAN style="FONT-SIZE: 12px; COLOR: #cccccc">(01-23)</SPAN> <IMG 
            src="时钟芯片IIDS1302.files/DOG.gif"><A style="COLOR: #ffffff" 
            href="http://www.zwmcu.com/zxdt_details.asp?id=19">紫微单片机工作室是一个专业的电子产品开发团队,提供电子产品开发服务,请联系我们</A> 
            <SPAN style="FONT-SIZE: 12px; COLOR: #cccccc">(12-04)</SPAN> <IMG 
            src="时钟芯片IIDS1302.files/DOG.gif"><A style="COLOR: #ffffff" 
            href="http://www.zwmcu.com/zxdt_details.asp?id=18">欢迎兄弟网站添加友情链接,联系QQ:67448574</A> 
            <SPAN 
            style="FONT-SIZE: 12px; COLOR: #cccccc">(06-19)</SPAN></MARQUEE></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD></TR></TBODY></TABLE>
<TABLE height=132 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
        <TBODY>
        <TR>
          <TD background=时钟芯片IIDS1302.files/index_10.jpg height=132>
            <TABLE cellSpacing=0 cellPadding=0 width=346 border=0>
              <TBODY>
              <TR>
                <TD width=188 height=85>&nbsp;</TD>
                <TD width=158>
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <FORM name=form0 action="" method=post>
                    <TBODY>
                    <TR>
                      <TD class=text1 width="31%" height=25>用户名:</TD>
                      <TD width="69%"><INPUT class=textbox style="WIDTH: 80px" 
                        disabled size=10 name=textfield> </TD></TR>
                    <TR>
                      <TD class=text1 height=25>密&nbsp;&nbsp;码:</TD>
                      <TD width="69%"><INPUT class=textbox style="WIDTH: 80px" 
                        disabled type=password size=10 name=textfield1></TD></TR>
                    <TR>
                      <TD colSpan=2 height=25><INPUT class=buttom style="WIDTH: 68px" disabled type=submit value=登陆论坛 name=Submit> 
<INPUT class=buttom disabled type=submit value="注  册" name=Submit></TD></TR></FORM></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD></TR></TBODY></TABLE>
<TABLE height=6 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
        <TBODY>
        <TR>
          <TD bgColor=#b9dbdb><IMG height=6 
            src="时钟芯片IIDS1302.files/index_11.jpg" 
width=7></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD></TR></TBODY></TABLE>
<TABLE height=11 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
        <TBODY>
        <TR>
          <TD width=7 bgColor=#b9dbdb height=50><IMG height=1 
            src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
          <TD style="FONT-SIZE: 12px" vAlign=center 
            bgColor=#f8fcfc><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A class=style5 
            href="http://www.zwmcu.com/index.asp">首页</A> &gt;&gt; <A 
            class=style5 
            href="http://www.zwmcu.com/list.asp?m_id=4&amp;str=英语学习">英语学习</A> 
            <BR><BR>
            <TABLE class=text borderColor=#b9dbdb cellSpacing=5 
            borderColorDark=#ffffff cellPadding=3 width="91%" align=center 
            bgColor=#f8fcfc borderColorLight=#cccccc border=1>
              <TBODY>
              <TR id=245>
                <TD class=chinese vAlign=top align=middle bgColor=#ffffff 
                height=22><STRONG 
                  style="FONT-SIZE: 16px">时钟芯片DS1302及其在数据记录中的应用</STRONG><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD></TR></TBODY></TABLE>
<TABLE height=11 cellSpacing=0 cellPadding=0 width=778 align=center border=0>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000><IMG height=1 
      src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 width=776 align=center border=0>
        <TBODY>
        <TR>
          <TD width=7 bgColor=#b9dbdb height=300><IMG height=1 
            src="时钟芯片IIDS1302.files/Spacer.gif" width=1></TD>
          <TD vAlign=top bgColor=#f8fcfc>
            <TABLE cellSpacing=0 cellPadding=0 width="93%" align=center 
border=0>
              <TBODY>
              <TR>
                <TD style="LINE-HEIGHT: 25px"><B><FONT color=#000080 
                  size=3><BR></FONT></B>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;摘 要: 
                  介绍了美国DALLAS公司推出的低功耗时钟芯片DS1302的结构和工作原理及其在测量系统中的应用。它可以对年、月、日、周日、时、分、秒进行计时,且具有闰年补偿等多种功能。DS1302用于数据记录,特别是对某些具有特殊意义的数据点的记录上,能实现数据与出现该数据的时间同时记录。这种记录对长时间的连续测控系统结果的分析以及对异常数据出现的原因的查找有重要意义。</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; 关键词: 数据记录 
                  时钟芯片DS1302 硬件电路 软件设计</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; 
                  在测量控制系统中,特别是长时间无人职守的测控系统中,经常需要记录某些具有特殊意义的数据及其出现的时间。记录及分析这些特殊意义的数据,对测控系统的性能分析及正常运行具有重要的意义。传统的数据记录方式是隔时采样或定时采样,没有具体的时间记录,因此只能记录数据而无法准确记录其出现的时间;若采用单片机计时,一方面需要采用计数器,占用硬件资源,另一方面需要设置中断、查询等,同样耗费单片机的资源,而且某些测控系统可能不允许。而在系统中采用DS1302则能很好地解决这个问题。</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; <B>1 
                  DS1302的结构及工作原理</B></FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; <IMG 
                  height=276 hspace=8 
                  src="时钟芯片IIDS1302.files/20056181862727.gif" width=332 
                  align=right vspace=8 
                  border=0>DS1302[1]是美国DALLAS公司推出的一种高性能、低功耗、带RAM的实时时钟芯片,它可以对年、月、日、周日、时、分、秒进行计时,且具有闰年补偿功能,工作电压宽达2.5~5.5V。采用三线接口与CPU进行同步通信,并可采用突发方式一次传送多个字节的时钟信号或RAM数据。DS1302内部有一个31×8的用于临时性存放数据的RAM寄存器。DS1302是DS1202的升级产品,与DS1202兼容,但增加了主电源/后背电源双电源引脚,同时提供了对后背电源进行涓细电流充电的能力。</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; 1.1 
                  引脚功能表及内部结构图</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; 
                  DS1302的引脚及内部结构如图1所示,引脚功能</FONT><A 
                  href="http://www.zwmcu.com/pic/20056181867820.gif"><FONT 
                  size=3>如表1</FONT></A><FONT size=3>所示。</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; 1.2 
                  DS1302的控制字节说明</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; <IMG 
                  height=84 hspace=8 
                  src="时钟芯片IIDS1302.files/200561818612508.gif" width=272 
                  align=right vspace=8 
                  border=0>DS1302的控制字如图2所示。</FONT></SPAN></P>
                  <P><SPAN class=main1><FONT size=3>&nbsp;&nbsp;&nbsp; 
                  控制字节的最高有效位(位7)必须是逻辑1,如果它为0,则不能把数据写入到DS1302中

⌨️ 快捷键说明

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