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

📄 5x系列芯片的复位入口问题.htm

📁 此为X102单片机 数码管显示电路及编程 键盘输入电路及编程 红外接收电路及编程 红外发送电路及编程 I2C总线电路及编程 计数器电路及编程 发光管电路及编 蜂鸣器电路及编程 扩展口电路及编程 RAM
💻 HTM
字号:
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./5x系列芯片的复位入口问题.files/filelist.xml">
<title>5x系列芯片的复位入口问题</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>zc</o:Author>
  <o:LastAuthor>zc</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>526</o:TotalTime>
  <o:Created>2004-12-20T11:49:00Z</o:Created>
  <o:LastSaved>2004-12-20T11:49:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Company>zcwyp</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:Version>9.2812</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:PunctuationKerning/>
  <w:DrawingGridHorizontalSpacing>5.25 磅</w:DrawingGridHorizontalSpacing>
  <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
  <w:Compatibility>
   <w:SpaceForUL/>
   <w:BalanceSingleByteDoubleByteWidth/>
   <w:DoNotLeaveBackslashAlone/>
   <w:ULTrailSpace/>
   <w:DoNotExpandShiftReturn/>
   <w:AdjustLineHeightInTable/>
   <w:UseFELayout/>
  </w:Compatibility>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-alt:SimSun;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
	{font-family:"\000B";
	panose-1:0 0 0 0 0 0 0 0 0 0;
	mso-font-alt:"Times New Roman";
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:auto;
	mso-font-signature:0 0 0 0 0 0;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;
	mso-font-charset:134;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:3 135135232 16 0 262145 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	mso-pagination:none;
	font-size:10.5pt;
	mso-bidi-font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:宋体;
	color:windowtext;
	mso-font-kerning:1.0pt;}
a:link, span.MsoHyperlink
	{mso-ansi-font-size:9.0pt;
	mso-bidi-font-size:9.0pt;
	color:blue;
	letter-spacing:12.0pt;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
p
	{margin-right:0cm;
	mso-margin-top-alt:auto;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:"Times New Roman";
	color:black;}
span.main1
	{mso-style-name:main1;}
p.tab, li.tab, div.tab
	{mso-style-name:tab;
	margin-right:0cm;
	mso-margin-top-alt:auto;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:宋体;
	mso-bidi-font-family:"Times New Roman";
	color:windowtext;}
 /* Page Definitions */
@page
	{mso-page-border-surround-header:no;
	mso-page-border-surround-footer:no;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:2.0cm 42.55pt 2.0cm 2.0cm;
	mso-header-margin:42.55pt;
	mso-footer-margin:49.6pt;
	mso-paper-source:0;
	layout-grid:15.6pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=purple style='tab-interval:21.0pt;text-justify-trim:
punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>5x</span></b><b><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>系列芯片的复位入口问题</span></b><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'><br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>有关</span><span lang=EN-US style='font-size:
9.0pt;font-family:"\000B"'>5x</span><span style='font-size:9.0pt;font-family:
宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>系列的复位入口位于可用程序空间的最高地址,在那里写上一条</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>GOTO&nbsp;MAIN</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>让程序跳到主程序入口。如:</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'><br>
ORG&nbsp;PIC16C54<br>
GOTO&nbsp;MAIN<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>这些都没有错误。很多书上也是这么写的。</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>其实,你可以根本不用管</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'>5x</span><span style='font-size:
9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>系列复位入口的不同,所有程序都从</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>000</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>位置开始写。以</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'>57</span><span style='font-size:
9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>为例,其复位地址是</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>7FFH</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>,空片时此处为</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'>FFF</span><span style='font-size:
9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>,对应指令是</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>&quot;xorlw&nbsp;0xff&quot;</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>,当这条指令执行后,</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'>PC</span><span style='font-size:
9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>加一,为</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>8000H</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>?不是,</span><span lang=EN-US style='font-size:
9.0pt;font-family:"\000B"'>PC</span><span style='font-size:9.0pt;font-family:
宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>变成</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>000H</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>,在</span><span lang=EN-US style='font-size:
9.0pt;font-family:"\000B"'>57</span><span style='font-size:9.0pt;font-family:
宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>中</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>PC</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>只有</span><span lang=EN-US style='font-size:
9.0pt;font-family:"\000B"'>11</span><span style='font-size:9.0pt;font-family:
宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>位长。类似的,所有</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>5x</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>系列在复位后于程序空间最高处执行一条无关紧要的指令后,回到</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>000</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>处继续执行。</span><span lang=EN-US style='font-size:
9.0pt;font-family:"\000B"'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>为什么推荐大家这么做?主要是在一些有片上内部</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'>RC</span><span style='font-size:
9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>振荡的单片机内,如</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>12C508</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>,</span><span lang=EN-US style='font-size:9.0pt;
font-family:"\000B"'>16C505</span><span style='font-size:9.0pt;font-family:
宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>等,在出厂前做了振荡器频率校准,校准值被放在复位入口出,以指令“</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>movlw&nbsp;xx</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>”形式存放。这时,如果你再在该处写指令</span><span lang=EN-US
style='font-size:9.0pt;font-family:"\000B"'>GOTO&nbsp;MAIN</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>,就会产生冲突。而且,这样写的程序移植性得到提高,程序排列不用做任何修改</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>(OPTION/TRIS</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>例外</span><span lang=EN-US style='font-size:
9.0pt;font-family:"\000B"'>)</span><span style='font-size:9.0pt;font-family:
宋体;mso-ascii-font-family:"\000B";mso-hansi-font-family:"\000B"'>,就可以移植到</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B"'>PIC</span><span
style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B"'>其它系列的单片机中</span></p>

</div>

</body>

</html>

⌨️ 快捷键说明

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