<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8%2Fzh</id>
		<title>第三十三课--Microduino制作烧写器/zh - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8%2Fzh"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;action=history"/>
		<updated>2026-04-21T09:55:21Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4945&amp;oldid=prev</id>
		<title>2014年10月25日 (六) 15:24 Bdharduino@126.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4945&amp;oldid=prev"/>
				<updated>2014-10-25T15:24:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2014年10月25日 (六) 15:24的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot; &gt;第67行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第67行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;OK，保存文件。再回到ArduinoISP的程序界面，点击Tools—Burn Bootloader，烧写完成后看到了什么？是的，13脚的led开始blink了，点击uno的Reset，led先是执行bootloader的闪烁，然后开始无休止的执行blink。这说明了我们的uno中既烧入了opti的bootloader，也烧入了app区的blink程序。一次完成，这样实际量产时，会给生产带来方便。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;OK，保存文件。再回到ArduinoISP的程序界面，点击Tools—Burn Bootloader，烧写完成后看到了什么？是的，13脚的led开始blink了，点击uno的Reset，led先是执行bootloader的闪烁，然后开始无休止的执行blink。这说明了我们的uno中既烧入了opti的bootloader，也烧入了app区的blink程序。一次完成，这样实际量产时，会给生产带来方便。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面介绍下.hex文件的组成，我们以optibootloader的第一行为例。:107E0000112484B714BE81FFF0D085E080938100F7。“：”的概念我们不去管它，“10”代表了该行的有效字节数为16，16进制嘛，10代表16。然后是“7E00”代表了328芯片Flash的地址位置，为什么是7E00，因为opti的bootloader有512个Byte（256Word），用32768（328的总Flash空间）减去512，得到的16进制数就是7E00，熔丝位烧写合适，复位向量就会直接跳到这里来的啊。后面的“00”，我们不去管它。然后是“112484B714BE81FFF0D085E080938100”共16个字节，对了，就是开头的“10”表征的这16个字节。最后一个字节是“F7”,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;和校验字节。校验的是“107E0000112484B714BE81FFF0D085E080938100”这一代堆数，什么是和校验？0X01的和校验字节就是FF，0X02的和校验字节就是FE，也就是总数加起来必须是256的整数倍。下面一个小软件可以获取和校验字节。供参考。上文删除的那一行“00000001FF”文字表明&lt;/del&gt;.hex文件的结束，如果不删这一行，两个hex文件揉在一起，后面的.hex文件不会被执行到。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面介绍下.hex文件的组成，我们以optibootloader的第一行为例。:107E0000112484B714BE81FFF0D085E080938100F7。“：”的概念我们不去管它，“10”代表了该行的有效字节数为16，16进制嘛，10代表16。然后是“7E00”代表了328芯片Flash的地址位置，为什么是7E00，因为opti的bootloader有512个Byte（256Word），用32768（328的总Flash空间）减去512，得到的16进制数就是7E00，熔丝位烧写合适，复位向量就会直接跳到这里来的啊。后面的“00”，我们不去管它。然后是“112484B714BE81FFF0D085E080938100”共16个字节，对了，就是开头的“10”表征的这16个字节。最后一个字节是“F7”,&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;和校验字节。校验的是“107E0000112484B714BE81FFF0D085E080938100”这一大堆数，什么是和校验？0X01的和校验字节就是FF，0X02的和校验字节就是FE，也就是总数加起来必须是256的整数倍。下面一个小软件可以获取和校验字节。供参考。上文删除的那一行“00000001FF”文字表明&lt;/ins&gt;.hex文件的结束，如果不删这一行，两个hex文件揉在一起，后面的.hex文件不会被执行到。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: sumCheck.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: sumCheck.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;更多更详细的hex文件描述可参考https://en.wikipedia.org/wiki/Intel_HEX&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;更多更详细的hex文件描述可参考https://en.wikipedia.org/wiki/Intel_HEX&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l77&quot; &gt;第77行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第77行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面以Avrdude.exe文件在D盘根目录下为例。Windows开始菜单—运行—cmd—回车—d:--回车—dir—回车—avrdude---回车 可见下图。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面以Avrdude.exe文件在D盘根目录下为例。Windows开始菜单—运行—cmd—回车—d:--回车—dir—回车—avrdude---回车 可见下图。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: avrdudeInit.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: avrdudeInit.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;输入avrdude -p m328p -c stk500v1 -b 19200 -P com2&amp;#160; -U flash:w:d:\a.hex:i&amp;#160; 后回车，接下来就是见证奇迹的时刻。看到一大堆#号（下图），然后再看13脚的led狂闪，事情成了，Flash写入了d:\a.hex文件，该文件读者可从前文提到的揉在一起的（含app，bootloader）.hex文件复制更名得到。Com口依据读者电脑更改，如果电脑的com口编号大，要改为小编号。笔者就因为Microduino-USBTTL被识别成com15耗进去几个小时，在设备管理器中更改即可。Avrdude更多命令行的学习请参考http://www.ladyada.net/learn/avr/avrdude.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;html。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;输入avrdude -p m328p -c stk500v1 -b 19200 -P com2&amp;#160; -U flash:w:d:\a.hex:i&amp;#160; 后回车，接下来就是见证奇迹的时刻。看到一大堆#号（下图），然后再看13脚的led狂闪，事情成了，Flash写入了d:\a.hex文件，该文件读者可从前文提到的揉在一起的（含app，bootloader）.hex文件复制更名得到。Com口依据读者电脑更改，如果电脑的com口编号大，要改为小编号。笔者就因为Microduino-USBTTL被识别成com15耗进去几个小时，在设备管理器中更改即可。Avrdude更多命令行的学习请参考http://www.ladyada.net/learn/avr/avrdude.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;html&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; [[File: avrdudeSucc.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; [[File: avrdudeSucc.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bdharduino@126.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4933&amp;oldid=prev</id>
		<title>2014年10月25日 (六) 15:09 Bdharduino@126.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4933&amp;oldid=prev"/>
				<updated>2014-10-25T15:09:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2014年10月25日 (六) 15:09的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot; &gt;第39行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第39行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;GND	GND&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;GND	GND&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Reset接10uf 电容到GND	&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Reset接10uf 电容到GND	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;接线就是这样的。这与Arduino官网提到的把Arduino 作为avr ISP &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;烧写器是一样的。链接：http&lt;/del&gt;://arduino.cc/en/Tutorial/ArduinoISP&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;接线就是这样的。这与Arduino官网提到的把Arduino 作为avr ISP &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;烧写器是一样的。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;链接：http&lt;/ins&gt;://arduino.cc/en/Tutorial/ArduinoISP&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==实验准备==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==实验准备==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bdharduino@126.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4932&amp;oldid=prev</id>
		<title>2014年10月25日 (六) 14:50 Bdharduino@126.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4932&amp;oldid=prev"/>
				<updated>2014-10-25T14:50:38Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2014年10月25日 (六) 14:50的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l49&quot; &gt;第49行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第49行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==相关实验==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==相关实验==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/del&gt;按照官网的说法来实现。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*'''&lt;/ins&gt;按照官网的说法来实现。&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;选择Tools—Programmer—ArduinoISP，这是在选择编程器。然后再点击Tools—Burn Bootloader。这时可以看到uno兼容板13脚的led闪烁，证明开始烧写了。uno的13脚与Microduino-Core&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;选择Tools—Programmer—ArduinoISP，这是在选择编程器。然后再点击Tools—Burn Bootloader。这时可以看到uno兼容板13脚的led闪烁，证明开始烧写了。uno的13脚与Microduino-Core&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;的13脚连在一起，所以uno上的小灯会闪烁。为什么arduino’板会选择13脚放led呢，可能是因为它的英文是SCK，也就是说烧写时钟到来时，它可兼作指示。只是我们用bootloader引导串口烧写时，它失去了闪烁的机会。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;的13脚连在一起，所以uno上的小灯会闪烁。为什么arduino’板会选择13脚放led呢，可能是因为它的英文是SCK，也就是说烧写时钟到来时，它可兼作指示。只是我们用bootloader引导串口烧写时，它失去了闪烁的机会。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;烧写成功图如下：[[File: burnBootloaderNormal.JPG|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;烧写成功图如下：[[File: burnBootloaderNormal.JPG|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;烧写成功后，被烧写的uno板的bootloader区已经有了opti-boot代码。当我们点击uno的reset按键时，13脚的小灯会闪几下，这时的小灯闪烁是因为uno的bootloader开始工作了。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;烧写成功后，被烧写的uno板的bootloader区已经有了opti-boot代码。当我们点击uno的reset按键时，13脚的小灯会闪几下，这时的小灯闪烁是因为uno的bootloader开始工作了。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/del&gt;瞒天过海，用ArduinoIDE烧写bootloader时顺便把app区的程序也烧写了。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*'''&lt;/ins&gt;瞒天过海，用ArduinoIDE烧写bootloader时顺便把app区的程序也烧写了。&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;当我们点下Tools—Burn Bootloader时，ArduinoIDE程序其实是把D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot目录下的optiboot_atmega328.hex作为烧写源文件的（根据安装目录不同，会有不同位置，Arduino官网提供的无需安装版里也可以方便找到hardware文件夹）。我们把optiboot_atmega328.hex稍改下名字再烧录，ArduinoIDE会提示avrdude: read from file 'D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot\optiboot_atmega328.hex' failed 是说找不到文件了。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;当我们点下Tools—Burn Bootloader时，ArduinoIDE程序其实是把D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot目录下的optiboot_atmega328.hex作为烧写源文件的（根据安装目录不同，会有不同位置，Arduino官网提供的无需安装版里也可以方便找到hardware文件夹）。我们把optiboot_atmega328.hex稍改下名字再烧录，ArduinoIDE会提示avrdude: read from file 'D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot\optiboot_atmega328.hex' failed 是说找不到文件了。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;见下图：[[File: optibootDirNG.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;见下图：[[File: optibootDirNG.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l63&quot; &gt;第63行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第64行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;删除下图选中的这一行&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;删除下图选中的这一行&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: blinkHEX_deleteEndFlag.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: blinkHEX_deleteEndFlag.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;OK，保存文件。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;OK，保存文件。再回到ArduinoISP的程序界面，点击Tools—Burn &lt;/ins&gt;Bootloader，烧写完成后看到了什么？是的，13脚的led开始blink了，点击uno的Reset，led先是执行bootloader的闪烁，然后开始无休止的执行blink。这说明了我们的uno中既烧入了opti的bootloader，也烧入了app区的blink程序。一次完成，这样实际量产时，会给生产带来方便。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;。&amp;#160; 再回到ArduinoISP的程序界面，点击Tools—Burn &lt;/del&gt;Bootloader，烧写完成后看到了什么？是的，13脚的led开始blink了，点击uno的Reset，led先是执行bootloader的闪烁，然后开始无休止的执行blink。这说明了我们的uno中既烧入了opti的bootloader，也烧入了app区的blink程序。一次完成，这样实际量产时，会给生产带来方便。&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面介绍下.hex文件的组成，我们以optibootloader的第一行为例。:107E0000112484B714BE81FFF0D085E080938100F7。“：”的概念我们不去管它，“10”代表了该行的有效字节数为16，16进制嘛，10代表16。然后是“7E00”代表了328芯片Flash的地址位置，为什么是7E00，因为opti的bootloader有512个Byte（256Word），用32768（328的总Flash空间）减去512，得到的16进制数就是7E00，熔丝位烧写合适，复位向量就会直接跳到这里来的啊。后面的“00”，我们不去管它。然后是“112484B714BE81FFF0D085E080938100”共16个字节，对了，就是开头的“10”表征的这16个字节。最后一个字节是“F7”,和校验字节。校验的是“107E0000112484B714BE81FFF0D085E080938100”这一代堆数，什么是和校验？0X01的和校验字节就是FF，0X02的和校验字节就是FE，也就是总数加起来必须是256的整数倍。下面一个小软件可以获取和校验字节。供参考。上文删除的那一行“00000001FF”文字表明.hex文件的结束，如果不删这一行，两个hex文件揉在一起，后面的.hex文件不会被执行到。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面介绍下.hex文件的组成，我们以optibootloader的第一行为例。:107E0000112484B714BE81FFF0D085E080938100F7。“：”的概念我们不去管它，“10”代表了该行的有效字节数为16，16进制嘛，10代表16。然后是“7E00”代表了328芯片Flash的地址位置，为什么是7E00，因为opti的bootloader有512个Byte（256Word），用32768（328的总Flash空间）减去512，得到的16进制数就是7E00，熔丝位烧写合适，复位向量就会直接跳到这里来的啊。后面的“00”，我们不去管它。然后是“112484B714BE81FFF0D085E080938100”共16个字节，对了，就是开头的“10”表征的这16个字节。最后一个字节是“F7”,和校验字节。校验的是“107E0000112484B714BE81FFF0D085E080938100”这一代堆数，什么是和校验？0X01的和校验字节就是FF，0X02的和校验字节就是FE，也就是总数加起来必须是256的整数倍。下面一个小软件可以获取和校验字节。供参考。上文删除的那一行“00000001FF”文字表明.hex文件的结束，如果不删这一行，两个hex文件揉在一起，后面的.hex文件不会被执行到。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l71&quot; &gt;第71行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第70行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;更多更详细的hex文件描述可参考https://en.wikipedia.org/wiki/Intel_HEX&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;更多更详细的hex文件描述可参考https://en.wikipedia.org/wiki/Intel_HEX&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;嗯，.hex文件介绍就写这么多吧。ArduinoIDE中File—Upload Using Programmer。单击它烧写blink程序后，bootloader就丢失了，读者熟悉了.hex文件之后，也就能知道个中缘由了。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;嗯，.hex文件介绍就写这么多吧。ArduinoIDE中File—Upload Using Programmer。单击它烧写blink程序后，bootloader就丢失了，读者熟悉了.hex文件之后，也就能知道个中缘由了。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/del&gt;脱离ArduinoIDE环境，直接寻求avrdude烧写。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*'''&lt;/ins&gt;脱离ArduinoIDE环境，直接寻求avrdude烧写。&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ArduinoIDE烧写程序从本质上说也是调用的avrdude烧写软件。Avrdude 链接：'''[[File:AVRDUDE.rar]]'''，Avrdude GUI 链接： ''' [[File: AVRdude GUI.rar]] '''。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ArduinoIDE烧写程序从本质上说也是调用的avrdude烧写软件。Avrdude 链接：'''[[File:AVRDUDE.rar]]'''，Avrdude GUI 链接： ''' [[File: AVRdude GUI.rar]] '''。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Avrdude是直接使用命令行操作的软件，Avrdude GUI化命令行为UI界面。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Avrdude是直接使用命令行操作的软件，Avrdude GUI化命令行为UI界面。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面以Avrdude.exe文件在D盘根目录下为例。Windows开始菜单—运行—cmd—回车—d:--回车—dir—回车—avrdude---回车 可见下图。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;下面以Avrdude.exe文件在D盘根目录下为例。Windows开始菜单—运行—cmd—回车—d:--回车—dir—回车—avrdude---回车 可见下图。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: avrdudeInit.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File: avrdudeInit.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;输入avrdude -p m328p -c stk500v1 -b 19200 -P com2&amp;#160; -U flash:w:d:\a.hex:i&amp;#160; 后回车，接下来就是见证奇迹的时刻。看到一大堆#号（下图），然后再看13脚的led狂闪，事情成了，Flash写入了d:\a.hex文件，该文件读者可从前文提到的揉在一起的（含app，bootloader）.hex文件复制更名得到。Com口依据读者电脑更改，如果电脑的com口编号大，要改为小编号。笔者就因为Microduino-USBTTL被识别成com15耗进去几个小时，在设备管理器中更改即可。Avrdude更多命令行的学习请参考http://www.ladyada.net/learn/avr/avrdude.html。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;输入avrdude -p m328p -c stk500v1 -b 19200 -P com2&amp;#160; -U flash:w:d:\a.hex:i&amp;#160; 后回车，接下来就是见证奇迹的时刻。看到一大堆#号（下图），然后再看13脚的led狂闪，事情成了，Flash写入了d:\a.hex文件，该文件读者可从前文提到的揉在一起的（含app，bootloader）.hex文件复制更名得到。Com口依据读者电脑更改，如果电脑的com口编号大，要改为小编号。笔者就因为Microduino-USBTTL被识别成com15耗进去几个小时，在设备管理器中更改即可。Avrdude更多命令行的学习请参考http://www.ladyada.net/learn/avr/avrdude.html。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; [[File: avrdudeSucc.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; [[File: avrdudeSucc.jpg.jpg|600px|center|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l86&quot; &gt;第86行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第85行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;与Microduino-USBTTL实实在在打造出了AVRISP。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;与Microduino-USBTTL实实在在打造出了AVRISP。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/del&gt;扩展实验：用淘宝上常见的USBasp与USBtinyISP烧写器6Pin或10Pin&amp;#160; ISP接口直接接到uno。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*'''&lt;/ins&gt;扩展实验：用淘宝上常见的USBasp与USBtinyISP烧写器6Pin或10Pin&amp;#160; ISP接口直接接到uno。&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;实物见下图：&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;实物见下图：&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; [[File: otherProgrammer.jpg.jpg|600px|center|thumb]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;用USBasp+avrdude（或avrdude GUI）可以实现读取烧写等。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;用USBasp+avrdude（或avrdude GUI）可以实现读取烧写等。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;用USBasp+ArduinoIDE不能实现，ArduinoIDE环境不能识别淘宝20元左右的USBasp。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;用USBasp+ArduinoIDE不能实现，ArduinoIDE环境不能识别淘宝20元左右的USBasp。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bdharduino@126.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4931&amp;oldid=prev</id>
		<title>2014年10月25日 (六) 14:44 Bdharduino@126.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4931&amp;oldid=prev"/>
				<updated>2014-10-25T14:44:57Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2014年10月25日 (六) 14:44的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l99&quot; &gt;第99行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第99行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==结果==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==结果==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;用Microduino-Core 与Microduino USBTTL实现了AVR通用编程器的功能，不管hex文件来自iccavr或是iar for avr抑或是atmel studio，都可以通过记事本把bootloader代码叠加进去，也不论芯片是88,168还是328，本文提到的Microduino烧写器(STK500v1协议)都可以帮你实现读取烧写。本文参考了阿古作坊里的文章，http://aguegu.net/?p=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1507，感谢阿古。&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;用Microduino-Core 与Microduino USBTTL实现了AVR通用编程器的功能，不管hex文件来自iccavr或是iar for avr抑或是atmel studio，都可以通过记事本把bootloader代码叠加进去，也不论芯片是88,168还是328，本文提到的Microduino烧写器(STK500v1协议)都可以帮你实现读取烧写。本文参考了阿古作坊里的文章，http://aguegu.net/?p=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;1507&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  感谢阿古。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==视频==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==视频==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bdharduino@126.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4930&amp;oldid=prev</id>
		<title>Bdharduino@126.com：Created page with &quot;用Microduino制作烧写器 {| style=&quot;width: 800px;&quot; |- | ==目的== 本教程讲解了Microduino-Core作为烧写器的软硬件环境，实现了AVR烧写器的功能（烧...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%B8%89%E5%8D%81%E4%B8%89%E8%AF%BE--Microduino%E5%88%B6%E4%BD%9C%E7%83%A7%E5%86%99%E5%99%A8/zh&amp;diff=4930&amp;oldid=prev"/>
				<updated>2014-10-25T14:42:10Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;用Microduino制作烧写器 {| style=&amp;quot;width: 800px;&amp;quot; |- | ==目的== 本教程讲解了Microduino-Core作为烧写器的软硬件环境，实现了AVR烧写器的功能（烧...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;用Microduino制作烧写器&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==目的==&lt;br /&gt;
本教程讲解了Microduino-Core作为烧写器的软硬件环境，实现了AVR烧写器的功能（烧写app区，烧写bootloader区，烧写熔丝等），同时介绍了AVRDUDE烧写工具、Intel 的.hex文件的组成结构。&lt;br /&gt;
==设备==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
Microduino-Core 是以 Atmel ATmega328P为核心的8位单片机开发核心板，是一个开源的、与 Arduino UNO 兼容的控制器模块。&lt;br /&gt;
&lt;br /&gt;
*'''[[Microduino-USBTTL]]'''&lt;br /&gt;
下载程序模块，可直接与 Microduino-Core 或者Microduino-Core+ 相连，让他们与计算机通讯。它的下载接口用的是MicUSB，这也是Microduino小巧的一部分。Microduino大小与一枚一元硬币差不多大。下载线与绝大多数智能手机usb数据线是一样的，方便实用。&lt;br /&gt;
&lt;br /&gt;
*其他硬件设备&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|相关硬件||数量||功能&lt;br /&gt;
|-&lt;br /&gt;
|10uf 16V电容 ||1个||连接于Microduino-Core 的RESET与GND。   &lt;br /&gt;
|-&lt;br /&gt;
|UNO板 ||1个||模拟被烧写芯片，另一片Microduino-Core也可以。              &lt;br /&gt;
|-                 &lt;br /&gt;
|USB数据连接线 ||1条||连通Microduino模块与计算机。&lt;br /&gt;
|-&lt;br /&gt;
|面包板 ||1块 ||各个元器件汇聚于此。&lt;br /&gt;
|-&lt;br /&gt;
|面包板跳线 ||1盒||电气连接线。&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==实验原理图==&lt;br /&gt;
Microduino (烧写器)	Uno兼容板（被烧写板）&lt;br /&gt;
D13	D13&lt;br /&gt;
D12	D12&lt;br /&gt;
D11	D11&lt;br /&gt;
D10	Reset&lt;br /&gt;
5V	5V&lt;br /&gt;
GND	GND&lt;br /&gt;
Reset接10uf 电容到GND	&lt;br /&gt;
接线就是这样的。这与Arduino官网提到的把Arduino 作为avr ISP 烧写器是一样的。链接：http://arduino.cc/en/Tutorial/ArduinoISP&lt;br /&gt;
&lt;br /&gt;
==实验准备==&lt;br /&gt;
在按照实验原理图接线前，首先把Microduino-Core与Micoduino-USBTTL叠加，再把Microduino-Core烧入ArduinoISP的程序，这个很轻松吧。打开Arudino程序的File—Examples--ArduinoISP 见下图：&lt;br /&gt;
[[File: burn_ISPprog.jpg|600px|center|thumb]]&lt;br /&gt;
烧写完该程序后，Microduino-Core已经具备了作为烧录器的硬件能力。作为烧写器的Microduino-Core在烧写过程中自然不应该有重启动作，所以用到了一个10uF电容。好，按照实验原理图接好线。&lt;br /&gt;
实物见下图：&lt;br /&gt;
[[File: MicroandUNORealConn.JPG|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==相关实验==&lt;br /&gt;
	按照官网的说法来实现。&lt;br /&gt;
选择Tools—Programmer—ArduinoISP，这是在选择编程器。然后再点击Tools—Burn Bootloader。这时可以看到uno兼容板13脚的led闪烁，证明开始烧写了。uno的13脚与Microduino-Core&lt;br /&gt;
的13脚连在一起，所以uno上的小灯会闪烁。为什么arduino’板会选择13脚放led呢，可能是因为它的英文是SCK，也就是说烧写时钟到来时，它可兼作指示。只是我们用bootloader引导串口烧写时，它失去了闪烁的机会。&lt;br /&gt;
烧写成功图如下：[[File: burnBootloaderNormal.JPG|600px|center|thumb]]&lt;br /&gt;
烧写成功后，被烧写的uno板的bootloader区已经有了opti-boot代码。当我们点击uno的reset按键时，13脚的小灯会闪几下，这时的小灯闪烁是因为uno的bootloader开始工作了。&lt;br /&gt;
	瞒天过海，用ArduinoIDE烧写bootloader时顺便把app区的程序也烧写了。&lt;br /&gt;
当我们点下Tools—Burn Bootloader时，ArduinoIDE程序其实是把D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot目录下的optiboot_atmega328.hex作为烧写源文件的（根据安装目录不同，会有不同位置，Arduino官网提供的无需安装版里也可以方便找到hardware文件夹）。我们把optiboot_atmega328.hex稍改下名字再烧录，ArduinoIDE会提示avrdude: read from file 'D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot\optiboot_atmega328.hex' failed 是说找不到文件了。&lt;br /&gt;
见下图：[[File: optibootDirNG.jpg|600px|center|thumb]]&lt;br /&gt;
下面我们在这个文件上作些文章。&lt;br /&gt;
首先，我们打开ArduinoIDE的Blink程序，然后找到Blink程序生成的hex文件。如何找到该hex文件呢？只需在ArduinoIDE上点击 ，或是快捷键ctrl+R，编译程序，不上载。这时在状态提示栏的倒数第二行便会有它的目录了。如下图。ctrl+C，找到该文件。如果你的ArduinoIDE没有显示这行文字，需要点击File—Preference—compilation复选框。用记事本或是其它文本编辑器打开该hex文件，把它的内容复制到剪贴板。然后再粘贴到D:\Program Files\Arduino\hardware\arduino\bootloaders\optiboot\optiboot_atmega328.hex这个文件的最上边（optiboot_atmega328.hex可以作个备份，为了以后恢复）。如下图，笔者是用notpad打开，记事本也可以的。&lt;br /&gt;
[[File: blinkHEX.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
删除下图选中的这一行&lt;br /&gt;
[[File: blinkHEX_deleteEndFlag.jpg|600px|center|thumb]]&lt;br /&gt;
OK，保存文件。&lt;br /&gt;
。  再回到ArduinoISP的程序界面，点击Tools—Burn Bootloader，烧写完成后看到了什么？是的，13脚的led开始blink了，点击uno的Reset，led先是执行bootloader的闪烁，然后开始无休止的执行blink。这说明了我们的uno中既烧入了opti的bootloader，也烧入了app区的blink程序。一次完成，这样实际量产时，会给生产带来方便。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
下面介绍下.hex文件的组成，我们以optibootloader的第一行为例。:107E0000112484B714BE81FFF0D085E080938100F7。“：”的概念我们不去管它，“10”代表了该行的有效字节数为16，16进制嘛，10代表16。然后是“7E00”代表了328芯片Flash的地址位置，为什么是7E00，因为opti的bootloader有512个Byte（256Word），用32768（328的总Flash空间）减去512，得到的16进制数就是7E00，熔丝位烧写合适，复位向量就会直接跳到这里来的啊。后面的“00”，我们不去管它。然后是“112484B714BE81FFF0D085E080938100”共16个字节，对了，就是开头的“10”表征的这16个字节。最后一个字节是“F7”,和校验字节。校验的是“107E0000112484B714BE81FFF0D085E080938100”这一代堆数，什么是和校验？0X01的和校验字节就是FF，0X02的和校验字节就是FE，也就是总数加起来必须是256的整数倍。下面一个小软件可以获取和校验字节。供参考。上文删除的那一行“00000001FF”文字表明.hex文件的结束，如果不删这一行，两个hex文件揉在一起，后面的.hex文件不会被执行到。&lt;br /&gt;
[[File: sumCheck.jpg|600px|center|thumb]]&lt;br /&gt;
更多更详细的hex文件描述可参考https://en.wikipedia.org/wiki/Intel_HEX&lt;br /&gt;
嗯，.hex文件介绍就写这么多吧。ArduinoIDE中File—Upload Using Programmer。单击它烧写blink程序后，bootloader就丢失了，读者熟悉了.hex文件之后，也就能知道个中缘由了。&lt;br /&gt;
	脱离ArduinoIDE环境，直接寻求avrdude烧写。&lt;br /&gt;
ArduinoIDE烧写程序从本质上说也是调用的avrdude烧写软件。Avrdude 链接：'''[[File:AVRDUDE.rar]]'''，Avrdude GUI 链接： ''' [[File: AVRdude GUI.rar]] '''。&lt;br /&gt;
Avrdude是直接使用命令行操作的软件，Avrdude GUI化命令行为UI界面。&lt;br /&gt;
下面以Avrdude.exe文件在D盘根目录下为例。Windows开始菜单—运行—cmd—回车—d:--回车—dir—回车—avrdude---回车 可见下图。&lt;br /&gt;
[[File: avrdudeInit.jpg.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
输入avrdude -p m328p -c stk500v1 -b 19200 -P com2  -U flash:w:d:\a.hex:i  后回车，接下来就是见证奇迹的时刻。看到一大堆#号（下图），然后再看13脚的led狂闪，事情成了，Flash写入了d:\a.hex文件，该文件读者可从前文提到的揉在一起的（含app，bootloader）.hex文件复制更名得到。Com口依据读者电脑更改，如果电脑的com口编号大，要改为小编号。笔者就因为Microduino-USBTTL被识别成com15耗进去几个小时，在设备管理器中更改即可。Avrdude更多命令行的学习请参考http://www.ladyada.net/learn/avr/avrdude.html。&lt;br /&gt;
 [[File: avrdudeSucc.jpg.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
下面介绍下Avrdude GUI。按下图选择&lt;br /&gt;
[[File: avrdudeUI.jpg.jpg|600px|center|thumb]]&lt;br /&gt;
-b 19200是必须要输入的。点击  看看效果吧。由图可以看出，熔丝位、锁定位、eeprom、Flash都由你掌控。自然，用命令行的方式也都可以实现。&lt;br /&gt;
这时，我们实现的功能已不仅仅是ArduinoIDE提供的烧写bootloader功能，我们借助ArduinoISP，avrdude GUI ,可以实现avr编程器能够实现的功能。用Microduino-Core&lt;br /&gt;
与Microduino-USBTTL实实在在打造出了AVRISP。&lt;br /&gt;
 &lt;br /&gt;
	扩展实验：用淘宝上常见的USBasp与USBtinyISP烧写器6Pin或10Pin  ISP接口直接接到uno。&lt;br /&gt;
实物见下图：&lt;br /&gt;
用USBasp+avrdude（或avrdude GUI）可以实现读取烧写等。&lt;br /&gt;
用USBasp+ArduinoIDE不能实现，ArduinoIDE环境不能识别淘宝20元左右的USBasp。&lt;br /&gt;
用USBasp+progisp可以实现读取烧写等。&lt;br /&gt;
&lt;br /&gt;
USBtinyISP极客工坊有售。&lt;br /&gt;
USBtiny+ avrdude（或avrdude GUI）可以实现读取烧写等。&lt;br /&gt;
USBtiny+ArduinoIDE可以实现在ArduinoIDE环境中使用Burn bootloader或是Upload Using Programmer。&lt;br /&gt;
&lt;br /&gt;
并且在avrdude命令行模式下，两款avr编程器均不需要输入-b  19200。在avrdude GUI中也无需输入 。&lt;br /&gt;
&lt;br /&gt;
==结果==&lt;br /&gt;
用Microduino-Core 与Microduino USBTTL实现了AVR通用编程器的功能，不管hex文件来自iccavr或是iar for avr抑或是atmel studio，都可以通过记事本把bootloader代码叠加进去，也不论芯片是88,168还是328，本文提到的Microduino烧写器(STK500v1协议)都可以帮你实现读取烧写。本文参考了阿古作坊里的文章，http://aguegu.net/?p=1507，感谢阿古。&lt;br /&gt;
==视频==&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bdharduino@126.com</name></author>	</entry>

	</feed>