📄 mega8学习笔记(4)-------cocoguojia 原创--单片机实验室-----嘉哥.htm
字号:
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>时 间 记 忆</TD></TR>
<TR>
<TD align=middle>
<DIV class=content4>
<DIV id=calendar>数据载入中...</DIV></DIV></TD></TR></TBODY></TABLE><!-- BEGIN: last_followups -->
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>最 新 评 论</TD></TR><!-- BEGIN: followups_row -->
<TR>
<TD>
<DIV class=content4>
<DIV id=comment>数据载入中...</DIV></DIV></TD></TR><!-- END: followups_row --></TBODY></TABLE><!-- END: last_followups -->
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>专 题 分 类</TD></TR>
<TR>
<TD>
<DIV class=content4>
<DIV id=subject>数据载入中...</DIV></DIV></TD></TR></TBODY></TABLE><!-- BEGIN: last_tb -->
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>最 新 日 志</TD></TR>
<TR>
<TD>
<DIV class=content4><!-- BEGIN: tb -->
<DIV
id=newblog>数据载入中...</DIV><!-- END: tb --></DIV></TD></TR></TBODY></TABLE><!-- END: last_tb -->
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>最 新 留 言</TD></TR>
<TR>
<TD>
<DIV class=content4>
<DIV id=newmessage>数据载入中...</DIV></DIV></TD></TR></TBODY></TABLE>
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>搜 索</TD></TR>
<TR>
<TD>
<DIV class=content4>
<DIV id=search>数据载入中...</DIV></DIV></TD></TR></TBODY></TABLE>
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>用 户 登 录</TD></TR>
<TR>
<TD align=middle>
<DIV class=content4>
<DIV id=ob_login>数据载入中...</DIV></DIV></TD></TR></TBODY></TABLE><!-- BEGIN: link -->
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>友 情 连 接</TD></TR>
<TR>
<TD>
<TABLE style="TABLE-LAYOUT: fixed; OVERFLOW: hidden"
cellSpacing=0 cellPadding=0 width="87%" align=center
border=0><TBODY>
<TR>
<TD class=b1>
<DIV id=links></DIV>
<DIV
id=gg_userlinks></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE class=table3 cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR>
<TD class=b2 align=middle height=43>博 客 信 息</TD></TR>
<TR>
<TD align=right>
<TABLE class=b1 cellSpacing=5 cellPadding=2 width="87%"
border=0>
<TBODY>
<TR>
<TD class=b1 align=left>
<DIV id=info>数据载入中...</DIV>
<DIV id=aobomusic></DIV></TD></TR>
<TR>
<TD class=b1 align=left>
<DIV id=xml><SPAN id=txml></SPAN><BR><BR><A
href="http://www.mcublog.com/blog/blog2007/cocoguojia/rss2.xml"
target=_blank><IMG height=14
src="Mega8学习笔记(4)-------cocoguojia 原创--单片机实验室-----嘉哥.files/xml.gif"
width=36
border=0></A></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- END: link --></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top>
<DIV id=content>
<TABLE cellSpacing=0 cellPadding=0 width="93%" align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>
<TABLE class=seyle4 cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD> </TD></TR>
<TR>
<TD
class=content9><STRONG>Mega8学习笔记(4)-------cocoguojia 原创 <IMG
src="Mega8学习笔记(4)-------cocoguojia 原创--单片机实验室-----嘉哥.files/jhinfo.gif"></STRONG></TD></TR>
<TR>
<TD>
<DIV align=right>[ 2008-5-27 14:35:00 | By: <SPAN
class=style3>嘉哥</SPAN> ]</DIV></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=3> </TD></TR></TBODY></TABLE>
<TABLE style="TABLE-LAYOUT: fixed" cellSpacing=0 cellPadding=0
width="100%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=oblog_text><SPAN id=ob_logd28224></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面我就以《</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman"> AVR
</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单片机入门与实践</SPAN><FONT
face="Times New Roman"> </FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》李弘</SPAN><FONT
face="Times New Roman"> </FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等编著</SPAN><SPAN
lang=EN-US><SPAN style="mso-spacerun: yes"><FONT
face="Times New Roman"> </FONT></SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">北京航空航天大学出版社这本书来讲述学习心得</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">前言:</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">IO</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">口操作和外部中断都掌握了后在往下进行</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">第四章:定时器</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">0
</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">1</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的学习</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><FONT
face="Times New Roman">P76</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">P80</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">页</SPAN><FONT
face="Times New Roman"> </FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">讲解的主要是</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">tmer0</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,其实没有什么比</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">tmer0</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还容易学的了。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要看懂</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">P78</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">页的表</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">2.22<SPAN
style="mso-spacerun: yes">
</SPAN>tmer0</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也可以触发中断</SPAN><FONT
face="Times New Roman"> </FONT><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中断屏蔽寄存器和中断标志寄存器设置一下就可用</SPAN><SPAN
lang=EN-US><FONT
face="Times New Roman">tmer0</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中断了(别忘了</SPAN><SPAN
lang=EN-US><FONT face="Times New Roman">#asm(“sei”)
</FONT></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><SPAN style="mso-spacerun: yes"><FONT
face="Times New Roman"></FONT></SPAN></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们可以给计数寄存器赋初值来控制中断发生的频率。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
lang=EN-US><o:p><FONT
face="Times New Roman"> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还有预分频的设置,但注意外部时钟源是不可以分频的(和</SPAN><SPAN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -