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

📄 适用于51单片机的万年历算法.htm

📁 适用于51单片机的万年历算法.rar
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0039)http://www.eleworld.com/ml200206_p2.htm -->
<HTML><HEAD><TITLE>电子世界</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="适用于51单片机的万年历算法.files/css.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0>
<TABLE cellSpacing=0 cellPadding=0 width=750 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top align=middle width=750 height=16><IMG height=22 
      src="适用于51单片机的万年历算法.files/HTTP.gif" width=760></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=12 height=74>&nbsp;</TD>
    <TD vAlign=center width=200><IMG height=60 
      src="适用于51单片机的万年历算法.files/logo.jpg" width=200 align=absMiddle></TD>
    <TD vAlign=top width=11>&nbsp;</TD>
    <TD vAlign=center width=50><IMG height=58 
      src="适用于51单片机的万年历算法.files/logo2.gif" width=61></TD>
    <TD vAlign=top width=9>&nbsp;</TD>
    <TD vAlign=top width=40><IMG height=73 
      src="适用于51单片机的万年历算法.files/logo1.gif" width=61></TD>
    <TD vAlign=top width=9>&nbsp;</TD>
    <TD vAlign=center align=middle width=401>
      <OBJECT 
      codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 
      height=70 width=400 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="dtlogo.swf"><PARAM NAME="quality" VALUE="high">
                              <embed src="dtlogo.swf" quality=high 
      pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" 
      type="application/x-shockwave-flash" width="400" height="70">        
      </embed>       </OBJECT></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top colSpan=2 height=20>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=bottom width=191 bgColor=#d5eae8 height=20> 今天是
            <SCRIPT language=JavaScript>
 today=new Date();
 function initArray(){
   this.length=initArray.arguments.length
   for(var i=0;i<this.length;i++)
   this[i+1]=initArray.arguments[i]  }
   var d=new initArray(
     "星期日",
     "星期一",
     "星期二",
     "星期三",
     "星期四",
     "星期五",
     "星期六");
document.write(
     "<font color=##000000 style='font-size:9pt;font-family: 宋体'> ",
     today.getYear(),"年",
     today.getMonth()+1,"月",
     today.getDate(),"日",
     d[today.getDay()+1],
     "</font>" ); 
</SCRIPT>
             </TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top width=569>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=bottom width=569 background=适用于51单片机的万年历算法.files/menu1.gif 
          height=20>
            <P><FONT color=#000066>  | <A 
            href="http://www.eleworld.com/index.html">首页</A> | <A 
            href="http://www.eleworld.com/zzjj.htm">杂志简介</A> | <A 
            href="http://www.eleworld.com/zzdy.htm">杂志订阅</A> | <A 
            href="http://www.eleworld.com/ggyw.htm">广告业务</A> | <A 
            href="http://www.eleworld.com/dzfwb.htm">读者服务部</A> | <A 
            href="http://www.eleworld.com/lxwm.htm">联系我们</A> 
        |</FONT></P></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD vAlign=top colSpan=3 height=20>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=bottom align=right width=760 height=20>当前位置:<A 
            href="http://www.eleworld.com/index.html">首页</A> &gt; 杂志目录<FONT 
            color=#000000></FONT> </TD></TR></TBODY></TABLE></TD></TR>
  <TR vAlign=bottom>
    <TD vAlign=top colSpan=3 height=20> <IMG height=10 
      src="适用于51单片机的万年历算法.files/ani1.gif" width=11><FONT 
      color=#000000>相关源程序</FONT></TD></TR>
  <TR>
    <TD vAlign=top width=66 bgColor=#f7fdff height=1504>&nbsp;</TD>
    <TD vAlign=top bgColor=#f7fdff colSpan=2>
      <P align=center><BR><B>适用于51系列单片机的一种万年历优化算法源程序<BR></B></P>
      <P>一、 阳历算法</P>
      <P>具体算法见函数Void get_solar_day_date(void),这样阳历日历的星期排法就确定了。<BR>表1:<BR></P>
      <TABLE cellSpacing=0 cellPadding=0 width=502 bgColor=#d9f7fd border=1>
        <TBODY>
        <TR>
          <TD width=54>
            <DIV align=center>月份</DIV></TD>
          <TD width=39>
            <DIV align=center>1</DIV></TD>
          <TD width=34>
            <DIV align=center>2</DIV></TD>
          <TD width=42>
            <DIV align=center>3</DIV></TD>
          <TD width=44>
            <DIV align=center>4</DIV></TD>
          <TD width=45>
            <DIV align=center>5</DIV></TD>
          <TD width=44>
            <DIV align=center>6</DIV></TD>
          <TD width=53>
            <DIV align=center>7</DIV></TD>
          <TD width=47>
            <DIV align=center>8</DIV></TD>
          <TD width=46>
            <DIV align=center>9</DIV></TD>
          <TD width=43>
            <DIV align=center>10</DIV></TD>
          <TD width=33>
            <DIV align=center>11</DIV></TD>
          <TD width=34>
            <DIV align=center>12</DIV></TD></TR>
        <TR>
          <TD width=54>
            <DIV align=center>闰年</DIV></TD>
          <TD width=39>
            <DIV align=center>31</DIV></TD>
          <TD width=34>
            <DIV align=center>29</DIV></TD>
          <TD width=42>
            <DIV align=center>31</DIV></TD>
          <TD width=44>
            <DIV align=center>30</DIV></TD>
          <TD width=45>
            <DIV align=center>31</DIV></TD>
          <TD width=44>
            <DIV align=center>30</DIV></TD>
          <TD width=53>
            <DIV align=center>31</DIV></TD>
          <TD width=47>
            <DIV align=center>31</DIV></TD>
          <TD width=46>
            <DIV align=center>30</DIV></TD>
          <TD width=43>
            <DIV align=center>31</DIV></TD>
          <TD width=33>
            <DIV align=center>30</DIV></TD>
          <TD width=34>
            <DIV align=center>31</DIV></TD></TR>
        <TR>
          <TD width=54>
            <DIV align=center>非闰年</DIV></TD>
          <TD width=39>
            <DIV align=center>31</DIV></TD>
          <TD width=34>
            <DIV align=center>28</DIV></TD>
          <TD width=42>
            <DIV align=center>31</DIV></TD>
          <TD width=44>
            <DIV align=center>30</DIV></TD>
          <TD width=45>
            <DIV align=center>31</DIV></TD>
          <TD width=44>
            <DIV align=center>30</DIV></TD>
          <TD width=53>
            <DIV align=center>31</DIV></TD>
          <TD width=47>
            <DIV align=center>31</DIV></TD>
          <TD width=46>
            <DIV align=center>30</DIV></TD>
          <TD width=43>
            <DIV align=center>31</DIV></TD>
          <TD width=33>
            <DIV align=center>30</DIV></TD>
          <TD width=34>
            <DIV align=center>31</DIV></TD></TR></TBODY></TABLE>
      <P>变量定义:<BR>Public:<BR>Unsigned int temp_total_day;<BR>Unsigned char 
      gc_solar_calendar_year;<BR>Unsigned char 
      gc_solar_calendar_month;<BR>Unsigned char 
      gc_solar_calendar_date;<BR>Unsigned char 
      gc_lunar_calendar_year;<BR>Unsigned char 
      gc_lunar_calendar_month;<BR>Unsigned char 

⌨️ 快捷键说明

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