?? 《智能電子鐘》的制作詳細介紹.htm
字號:
</SPAN>inc min<SPAN style="mso-spacerun: yes">
</SPAN>;分加一<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>;**********<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>clr ha_over<SPAN style="mso-spacerun: yes">
</SPAN>;2001.5.6<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov a,min<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>cjne a,#60d,clock_end<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov min,#00h<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">;<SPAN
lang=EN-US>******<SPAN style="mso-spacerun: yes">
</SPAN>添加的程序<SPAN style="mso-tab-count: 1">
</SPAN>*************<SPAN style="mso-tab-count: 1">
</SPAN><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>CLR<SPAN style="mso-spacerun: yes"> </SPAN>BEEP</SPAN><SPAN
lang=EN-US style="FONT-FAMILY: ËÎÌå">_F ;</SPAN><SPAN
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">打開蜂鳴器<SPAN
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>SETB<SPAN style="mso-spacerun: yes"> </SPAN>10H
;標志<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">;<SPAN
lang=EN-US>***************************************<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>inc hour<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov a,hour<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 1">
</SPAN>加入上述幾條指令,電子鐘便會在正點,發出“嘟”的一聲。<o:p></o:p></SPAN></P>
<P class=MsoNormal><B><SPAN
style="FONT-SIZE: 14pt; FONT-FAMILY: 宋體; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'Times New Roman'">五、修改上電的默認時間、定時值<SPAN
lang=EN-US><o:p></o:p></SPAN></SPAN></B></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>許多讀者認為上電初始的時間值、定時值,不符合個人的習慣和要求,在這里向大家介紹修改的方法。<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt"><SPAN
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">時間默認值在子程序:<SPAN
lang=EN-US>timer_int 中修改,見下:<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">timer_int:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>MOV T_1S,#TIMER_no<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov beep_t,#15d<SPAN style="mso-spacerun: yes">
</SPAN>;蜂鳴的時間(秒)<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov year ,#01d<SPAN style="mso-spacerun: yes">
</SPAN>;年定義:2001年<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov mon , #011d<SPAN style="mso-spacerun: yes">
</SPAN>;月定義:11月<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov day , #06d<SPAN style="mso-spacerun: yes">
</SPAN>;日定義:6號<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov hour ,#13d<SPAN style="mso-spacerun: yes">
</SPAN>;小時定義:13點<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov min , #00d<SPAN style="mso-spacerun: yes">
</SPAN>;分定義:00分<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 2">
</SPAN>mov sec , #00d<SPAN style="mso-spacerun: yes">
</SPAN>;秒定義:00秒<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-spacerun: yes"> </SPAN>定時時間默認值在標號:</SPAN><SPAN lang=EN-US
style="FONT-FAMILY: ËÎÌå">al_asc</SPAN><SPAN
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">的表內<SPAN
lang=EN-US>,見下:<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'">al_asc:<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 1"> </SPAN>db 05d,00d,
05d,05d, 05d,15d, 06d,00d;am 代表5:00;5:05;5:15<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 1"> </SPAN>db 06d,05d,
06d,15d, 14d,00d, 14d,10d;pm <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 1">
</SPAN>根據自己的需要修改即可!數據中的d代表是十進制的數,請不要刪除!<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></P>
<P class=MsoNormal><B><SPAN
style="FONT-SIZE: 16pt; FONT-FAMILY: 宋體; mso-bidi-font-size: 10.0pt; mso-hansi-font-family: 'Times New Roman'">六、編譯<SPAN
lang=EN-US><o:p></o:p></SPAN></SPAN></B></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-spacerun: yes">
</SPAN>對源程序的任何改動,都必須要重新編譯,生成HEX目標文件,燒入單片機。不同公司的編譯器都有自己的偽指令定義方法,不一定通用,因此選擇編譯器至關重要。請用南京偉福的編譯器(www.wave-cn.com)MCS51.EXE,DOS版的。如果沒有電腦、編程器,可與本人聯系代為燒之。<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><SPAN
style="mso-tab-count: 1">
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-FAMILY: 宋體; mso-hansi-font-family: 'Times New Roman'"><![if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></P></DIV></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -