📄 sd和mmc记忆卡介面技术基带.mht
字号:
class=3Dmidheadline><span style=3D'font-family:SimSun;mso-bidi-fo=
nt-family:
SimSun'>MMC的资料作业</span></span>=
<br>
MMC的资料读写作业ࡤ=
7;以包含:单一区块、&=
#22810;区块、<span
class=3DGramE>串流的</span>传输=
290;这些作业可以透过DMA=
469;加速传输,这是藉由=
;设定模式暂存器(mode
register)的<span class=3DGramE>位元Í=
40;来做</span>切换。区块的&=
#38271;度也必须在模式暂=
384;器中设定。
<o:p></o:p></span></p>
<p style=3D'line-height:15.0pt;word-break:break-all'><span
style=3D'font-size:9.0pt;color:black'>下列所=
6848;是读取单一区块,߳=
1;用或不使用<span
lang=3DEN-US>DMA时的作业流程&=
#12290;读取作业结束时,=
487;以<span
class=3DGramE>採</span>用轮询(poll=
ing)或中断的方式来处=
理,本范例中是使用=
6718;询的方法。这些都਷=
9;<span
class=3DGramE>属于韧体工程=
4072;</span>的程式设计工作。=
;<o:p></o:p></span></span></p>
<p style=3D'line-height:15.0pt;word-break:break-all'><span
style=3D'font-size:9.0pt;color:black'>.送出<sp=
an
lang=3DEN-US>SEL_DESEL_CARD命令,来๧=
3;择MMC记忆卡。<br>
.送出SET_BLOCKLEN命令。<br>
.如果是透过DMA来෿=
5;取,则按照附图六右&=
#20391;的流程,否则按照&=
468;图六左侧的流程。<o:p></=
o:p></span></span></p>
<p style=3D'line-height:15.0pt;word-break:break-all'><span lang=
=3DEN-US
style=3D'font-size:9.0pt;color:black'>MMC的写入=
作业使用模式暂存器=
6469;定义在写入非多区ࢻ=
9;大小时的填充值(padding
value),这是藉由写=
837;模式暂存器的一<span
class=3DGramE>个位元来决定</s=
pan>。例如:对该位元写=
;入0,代表填充值是0x00ʍ=
07;若写入1,则代表填充=
;值是0xFF。MMC写入单一区=
2359;作业流程的前面两ߑ=
0;步骤与上述的MMC读取߯=
6;业流程相同,如果是&=
#36879;过DMA来读取,则按照&=
#38468;图七右侧的流程,=
542;则按照附图七左侧的=
;流程。<br>
 <o:p></o:p></span></p>
<div align=3Dcenter>
<table class=3DMsoNormalTable border=3D0 cellspacing=3D1 cellpadd=
ing=3D0
style=3D'mso-cellspacing:.7pt'>
<tr style=3D'mso-yfti-irow:0;mso-yfti-lastrow:yes'>
<td style=3D'padding:.75pt .75pt .75pt .75pt'>
<p class=3DMsoNormal style=3D'line-height:15.0pt;word-break:bre=
ak-all'><span
lang=3DEN-US style=3D'font-size:9.0pt;color:black'><!--[if gte =
vml 1]><v:shape
id=3D"_x0000_i1330" type=3D"#_x0000_t75" alt=3D"" style=3D'wid=
th:375pt;
height:309pt'>
<v:imagedata src=3D"file7222.files/image011.jpg" o:href=3D"htt=
p://www.52rd.com/upload/2006_8/File20068221127580371.jpg"/>
</v:shape><![endif]--><![if !vml]><img border=3D0 width=3D500
height=3D412 src=3D"file7222.files/image011.jpg" v:shapes=3D"_x=
0000_i1330"><![endif]><o:p></o:p></span></p>
</td>
</tr>
</table>
</div>
<p align=3Dcenter style=3D'text-align:center;line-height:15.0pt;
word-break:break-all'><span lang=3DEN-US style=3D'font-size:9.0pt;
color:black'><br>
<br>
<span class=3DGramE>图六</span>:MMC的=
6164;料读取作业流程<br>
 <o:p></o:p></span></p>
<div align=3Dcenter>
<table class=3DMsoNormalTable border=3D0 cellspacing=3D1 cellpadd=
ing=3D0
style=3D'mso-cellspacing:.7pt'>
<tr style=3D'mso-yfti-irow:0;mso-yfti-lastrow:yes'>
<td style=3D'padding:.75pt .75pt .75pt .75pt'>
<p class=3DMsoNormal style=3D'line-height:15.0pt;word-break:bre=
ak-all'><span
lang=3DEN-US style=3D'font-size:9.0pt;color:black'><!--[if gte =
vml 1]><v:shape
id=3D"_x0000_i1331" type=3D"#_x0000_t75" alt=3D"" style=3D'wid=
th:375pt;
height:289.5pt'>
<v:imagedata src=3D"file7222.files/image012.jpg" o:href=3D"htt=
p://www.52rd.com/upload/2006_8/File200682211275379959.jpg"/>
</v:shape><![endif]--><![if !vml]><img border=3D0 width=3D500
height=3D386 src=3D"file7222.files/image012.jpg" v:shapes=3D"_x=
0000_i1331"><![endif]><o:p></o:p></span></p>
</td>
</tr>
</table>
</div>
<p align=3Dcenter style=3D'text-align:center;line-height:15.0pt;
word-break:break-all'><span lang=3DEN-US style=3D'font-size:9.0pt;
color:black'><br>
<br>
<span class=3DGramE>图七</span>:MMC的=
6164;料写入作业流程<br>
 <o:p></o:p></span></p>
</td>
</tr>
<tr style=3D'mso-yfti-irow:6;height:30.0pt'>
<td width=3D690 style=3D'width:517.5pt;padding:3.75pt 3.75pt 3.75=
pt 3.75pt;
height:30.0pt'>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center;li=
ne-height:
15.0pt;word-break:break-all'><span lang=3DEN-US style=3D'font-siz=
e:9.0pt;
color:black'> <o:p></o:p></span></p>
</td>
</tr>
<tr style=3D'mso-yfti-irow:7'>
<td width=3D690 style=3D'width:517.5pt;background:whitesmoke;padd=
ing:
3.75pt 3.75pt 3.75pt 3.75pt'>
<p class=3DMsoNormal style=3D'line-height:15.0pt;word-break:break=
-all'><span
lang=3DEN-US style=3D'font-size:9.0pt;color:black'><!--[if gte vm=
l 1]><v:shape
id=3D"_x0000_i1332" type=3D"#_x0000_t75" alt=3D"" style=3D'width=
:7.5pt;
height:18.75pt'>
<v:imagedata src=3D"file7222.files/image002.gif" o:href=3D"http:=
//www.eedesign.com.tw/article/94event/0503_newstyle/e-img-1.gif"/>
</v:shape><![endif]--><![if !vml]><img border=3D0 width=3D10 heig=
ht=3D25
src=3D"file7222.files/image002.gif" v:shapes=3D"_x0000_i1332"><![=
endif]><span
class=3Dmidheadline><span style=3D'font-family:SimSun;mso-bidi-fo=
nt-family:
SimSun'>SD传输作业</span></span><br>
SD记忆卡包含了版权=
;保护功能,它遵守SDMI੧=
1;准,可以避免资料被&=
#30423;拷。由于它的传输$=
895;率比较快,所以适用=
;于需要记忆容量较大&#=
30340;应用。除了少数的Ɔ=
69;外功能以外,SD在尺ल=
4;大小、<span
class=3DGramE>脚位数目</span>和=
151;能、传输通信协定方=
;面,大致上是和MMC相容=
;的。因此,SD的读写作=
业程序也和上述的MMC读=
写作业程序类似。
<o:p></o:p></span></p>
<p style=3D'line-height:15.0pt;word-break:break-all'><span
style=3D'font-size:9.0pt;color:black'>透过<span lang=
=3DEN-US>SD控制暂存器(MCI_SDCR)=
,可以选择插槽位置=
1644;资料<span
class=3DGramE>匯流排的</span>宽=
230;。SD<span
class=3DGramE>匯流排的</span>资=
009;线路数目也可以被动=
;态地设定,开机后的&#=
39044;设值是DAT0;初始化时&=
#65292;<span
class=3DGramE>韧体工程师</span>=
487;以改变这个值,以符=
;合实体的资料线路之&#=
25968;目。SD控制暂存器如=
8468;图八所示。<br>
 <o:p></o:p></span></span></p>
<div align=3Dcenter>
<table class=3DMsoNormalTable border=3D0 cellspacing=3D1 cellpadd=
ing=3D0
style=3D'mso-cellspacing:.7pt'>
<tr style=3D'mso-yfti-irow:0;mso-yfti-lastrow:yes'>
<td style=3D'padding:.75pt .75pt .75pt .75pt'>
<p class=3DMsoNormal style=3D'line-height:15.0pt;word-break:bre=
ak-all'><span
lang=3DEN-US style=3D'font-size:9.0pt;color:black'><!--[if gte =
vml 1]><v:shape
id=3D"_x0000_i1333" type=3D"#_x0000_t75" alt=3D"" style=3D'wid=
th:375pt;
height:188.25pt'>
<v:imagedata src=3D"file7222.files/image013.jpg" o:href=3D"htt=
p://www.52rd.com/upload/2006_8/File200682211281771867.jpg"/>
</v:shape><![endif]--><![if !vml]><img border=3D0 width=3D500
height=3D251 src=3D"file7222.files/image013.jpg" v:shapes=3D"_x=
0000_i1333"><![endif]><o:p></o:p></span></p>
</td>
</tr>
</table>
</div>
<p align=3Dcenter style=3D'text-align:center;line-height:15.0pt;
word-break:break-all'><span lang=3DEN-US style=3D'font-size:9.0pt;
color:black'><br>
<br>
<span class=3DGramE>图八</span>:SD控=
046;暂存器<br>
 <o:p></o:p></span></p>
</td>
</tr>
<tr style=3D'mso-yfti-irow:8;height:30.0pt'>
<td width=3D690 style=3D'width:517.5pt;padding:3.75pt 3.75pt 3.75=
pt 3.75pt;
height:30.0pt'>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center;li=
ne-height:
15.0pt;word-break:break-all'><span lang=3DEN-US style=3D'font-siz=
e:9.0pt;
color:black'> <o:p></o:p></span></p>
</td>
</tr>
<tr style=3D'mso-yfti-irow:9'>
<td width=3D690 style=3D'width:517.5pt;background:whitesmoke;padd=
ing:
3.75pt 3.75pt 3.75pt 3.75pt'>
<p class=3DMsoNormal style=3D'line-height:15.0pt;word-break:break=
-all'><span
lang=3DEN-US style=3D'font-size:9.0pt;color:black'><!--[if gte vm=
l 1]><v:shape
id=3D"_x0000_i1334" type=3D"#_x0000_t75" alt=3D"" style=3D'width=
:7.5pt;
height:18.75pt'>
<v:imagedata src=3D"file7222.files/image002.gif" o:href=3D"http:=
//www.eedesign.com.tw/article/94event/0503_newstyle/e-img-1.gif"/>
</v:shape><![endif]--><![if !vml]><img border=3D0 width=3D10 heig=
ht=3D25
src=3D"file7222.files/image002.gif" v:shapes=3D"_x0000_i1334"><![=
endif]><span
class=3Dmidheadline><span style=3D'font-family:SimSun;mso-bidi-fo=
nt-family:
SimSun'>MMC驱动程式</span></span><br>
对任何一种记忆卡&=
#24212;用而言,它必须具=
791;下列的基本功能:<br>
.热插拔。<br>
.当记忆卡插入或&=
#31227;除时,中断<span
class=3DGramE>服务常式</span>(ISR&=
#65289;必须能够立即发现=
644;反应。<br>
.当记忆卡插入时&=
#65292;ISR必须能将新加入的&=
#35760;忆卡<span
class=3DGramE>位址或</span>名称=
312;应用程式中显示出来=
;。移除时,此记忆卡<s=
pan
class=3DGramE>位址或</span>名称=
063;能从应用程式中消失=
;。<br>
.当记忆卡插入时&=
#65292;记忆<span
class=3DGramE>卡必须</span>像硬=
879;一样,被「挂(mount)&#=
12301;在硬碟的根目录底Ç=
79;。同理,当记忆卡被=
移除时,它就会被「=
1368;&
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -