deafguy 发表于 2011-12-21 08:43

MCU 周期

<div style="text-align: center; font-weight: bold;"><font size="4">几个周期的概念<br></font></div>时间由长至短:<br>1)指令周期 (Instruction Cycle)<br>2)总线周期 (BUS Cycle) / 机器周期(Machine Cycle)<br>3)时钟周期 (Clock Cycle)<br><br>时钟周期:单片机时钟频率的倒数。e.g. 1MHZ 始终频率,时钟周期为 1 us。<br><br><br><div style="text-align: center; font-weight: bold;"><font size="4">8051单片机de周期<br></font></div><span style="font-weight: bold;">几个概念</span>:节拍(P),状态周期(S),机器周期,指令周期,总线周期<br><br>晶振频率(crystal frequency): 外接晶振的频率。<br>时钟周期(clock cycle) : 1/晶振频率<br><br>8051单片机晶振频率范围:1.2MHZ ~ 12MHZ。常用晶振频率, 12MHZ,11.059 HMZ。11.059MHZ 这个奇怪的频率据说是主要为了便于设置串口通讯的波特率。<br><br>节拍:8051单片机将一个时钟周期定义为一个节拍(P)<br>状态周期:两个节拍定义为一个状态周期(S)<br>机器周期:6个状态为一个机器周期。1个机器周期 = 6个状态周期 = 12个时钟周期 = 12 秒/晶振频率<br><br>机器周期的细节:一般使用从内存中读取一个指令字所需的最短时间来计算。即,通过外部/内部总线进行一次数据传输从而完成一个或几个微操作所需的时间。<br><br>现在的8051单片机的机器周期不一定是12个时钟周期。请看:<br>【from <a href="http://en.wikipedia.org/wiki/Intel_MCS-51" target="_blank" target="_blank">http://en.wikipedia.org/wiki/Intel_MCS-51 </a>】<br> The original 8051 core ran at 12 clock cycles per machine cycle, with most instructions executing in one or two machine cycles. .... Enhanced 8051 cores are now commonly used which run at six, four, two, or even one clock per machine cycle,...<br><br>指令周期:执行一条指令的时间。包含一个或者多个机器周期。单周期指令,双周期指令。<br><br><br><div align="center"><b>指令的执行时间</b><br><div align="left">前提条件:<br><ul><li>单周期指令</li><li>一个机器周期等于12个时钟周期</li><li>晶振频率12MHz </li></ul>单周期指令的执行时间 = 12 * 1/Fos = 12 * 1 /12000000 = 1/1000000 (s) = 1(μs,微妙)<br></div></div><br><div align="center"><font size="4"><b>Reference</b></font><br></div>MCS-51 WIKI: <a href="http://en.wikipedia.org/wiki/Intel_MCS-51" target="_blank" target="_blank">http://en.wikipedia.org/wiki/Intel_MCS-51</a><br>8051 Tutorial: <a href="http://www.8052.com/tuttimng.phtml" target="_blank" target="_blank">http://www.8052.com/tuttimng.phtml</a><br>机器周期: <a href="http://wenku.baidu.com/view/b0414ca0284ac850ad024282.html" target="_blank" target="_blank">http://wenku.baidu.com/view/b0414ca0284ac850ad024282.html</a><br><br>
页: [1]
查看完整版本: MCU 周期