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

📄 c8051f320在usb设计中的应用.htm

📁 c8051f32x data sheet
💻 HTM
📖 第 1 页 / 共 5 页
字号:
      <td width="10%" style='width:10.0%;padding:0cm 0cm 0cm 0cm'>
      <p class=MsoNormal align=center style='text-align:center'><span
      class=tt2><span style='font-size:9.0pt'>详文</span></span><span lang=EN-US
      style='font-size:9.0pt;color:#333333'><o:p></o:p></span></p>
      </td>
      <td width="90%" style='width:90.0%;padding:0cm 0cm 0cm 0cm'>
      <form action="http://www.21icsearch.com/buzi/mail2/chkemail.asp"
      method=POST enctype="application/x-www-form-urlencoded" name=email
      target="_blank">
      <p class=MsoNormal align=center style='text-align:center'><b><span
      style='font-size:9.0pt;color:#333333'>电子工程周刊:</span></b><span
      style='font-size:9.0pt;color:#333333'> <span lang=EN-US><INPUT TYPE="text" MAXLENGTH="55" SIZE="10" NAME="email" VALUE="Email"
      style="BORDER-RIGHT: #0097cf 1px solid; BORDER-TOP: #0097cf 1px solid; BORDER-LEFT: #0097cf 1px solid; BORDER-BOTTOM: #0097cf 1px solid; BACKGROUND-COLOR: #ffffff"></span> <span
      lang=EN-US><INPUT TYPE="submit" ACTION="http://www.21icsearch.com/buzi/mail2/chkemail.asp" VALUE="订阅" METHOD="POST">
      </span>←自动接收新闻,资料,设计应用 <span lang=EN-US><o:p></o:p></span></span></p>
      </form>
      </td>
     </tr>
    </table>
    </div>
    <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
    style='font-size:9.0pt;color:#333333'><o:p></o:p></span></p>
    </td>
    <td width=10 style='width:7.2pt;padding:0cm 0cm 0cm 0cm;height:22.5pt'>
    <p class=MsoNormal align=center style='text-align:center'><span lang=EN-US
    style='font-size:9.0pt;color:#333333'><o:p>&nbsp;</o:p></span></p>
    </td>
   </tr>
  </table>
  <div id=printBody>
  <p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;color:#333333;
  display:none;mso-hide:all'><o:p>&nbsp;</o:p></span></p>
  <div align=center>
  <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
   style='width:100.0%;mso-cellspacing:0cm;mso-padding-alt:0cm 0cm 0cm 0cm'>
   <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
    <td width=10 style='width:7.2pt;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal style='word-break:break-all'><span lang=EN-US
    style='font-size:9.0pt;color:#333333'><o:p>&nbsp;</o:p></span></p>
    </td>
    <td valign=top style='background:#E7E7E7;padding:2.25pt 2.25pt 2.25pt 2.25pt'>
    <p class=MsoNormal style='word-break:break-all'><span lang=EN-US
    style='font-size:9.0pt;color:#333333'><o:p>&nbsp;</o:p></span></p>
    <h1 align=center style='text-align:center;word-break:break-all'><span
    lang=EN-US style='font-size:11.5pt;color:#333333'>C8051F320</span><span
    style='font-size:11.5pt;color:#333333'>在<span lang=EN-US>USB</span>设计中的应用<span
    lang=EN-US><o:p></o:p></span></span></h1>
    <div align=center>
    <table class=MsoNormalTable border=0 cellpadding=0 width="97%"
     style='width:97.0%;mso-cellspacing:1.5pt'>
     <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
      <td width=120 style='width:90.0pt;padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=center style='text-align:center'><span
      lang=EN-US style='font-size:9.0pt;color:#333333'>[</span><span
      style='font-size:9.0pt;color:#333333'>日期:<span lang=EN-US><span
      id=TimeLabel>2005-8-10</span>]<o:p></o:p></span></span></p>
      </td>
      <td style='padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=center style='text-align:center'><span
      style='font-size:9.0pt;color:#333333'>来源:<span id=SourceLabel>国外电子元器件</span><span
      lang=EN-US>&nbsp; </span>作者:<span id=AuthorLabel>李建平 </span><span
      lang=EN-US><o:p></o:p></span></span></p>
      </td>
      <td width=100 style='width:75.0pt;padding:.75pt .75pt .75pt .75pt'>
      <p class=MsoNormal align=right style='text-align:right'><span lang=EN-US
      style='font-size:9.0pt;color:#333333'>[</span><span style='font-size:
      9.0pt;color:#333333'>字体:<span lang=EN-US><a
      href="javascript:ContentSize(16)"><span lang=EN-US><span lang=EN-US>大</span></span></a>
      <a href="javascript:ContentSize(14)"><span lang=EN-US><span lang=EN-US>中</span></span></a>
      <a href="javascript:ContentSize(12)"><span lang=EN-US><span lang=EN-US>小</span></span></a>]
      <o:p></o:p></span></span></p>
      </td>
     </tr>
    </table>
    </div>
    <p class=MsoNormal style='line-height:140%;word-break:break-all'><span
    lang=EN-US style='font-size:9.0pt;line-height:140%;color:#333333'><script language="JavaScript1.1"  src="http://afp21ic.allyes.com/main/adfshow?user=Afp21ic|innewshtml|newshtml&db=afp21ic&border=0&local=yes&js=ie">
    </script><!--DVNEWS_AD_BEGIN--><!--Adforward Begin:--></span><span
    lang=EN-US style='font-size:10.5pt;line-height:140%;color:#333333'><!--Adforward End--><!--DVNEWS_AD_END-->&nbsp;&nbsp;
    </span><b><span style='font-size:10.5pt;line-height:140%;color:#333333'>摘要:</span></b><span
    lang=EN-US style='font-size:10.5pt;line-height:140%;color:#333333'>C8051F320</span><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>是<span lang=EN-US>Cygnal</span>公司推出的一款新型<span
    lang=EN-US>USB</span>微控制器芯片。该器件具有较快的处理速度和较大的存储容量,并且具有在系统可编程的功能,是<span
    lang=EN-US>USB</span>接口设计的理想选择。文中介绍了<span lang=EN-US>C8051F320</span>的特点和引脚功能,并以一个<span
    lang=EN-US>USB-CAN</span>接口转换模块为例介绍了<span lang=EN-US>USB</span>接口的软硬件设计。 <span
    lang=EN-US><o:p></o:p></span></span></p>
    <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
    auto;line-height:140%;word-break:break-all'><span lang=EN-US
    style='font-family:"Times New Roman";mso-bidi-font-family:宋体;color:#333333'>&nbsp;&nbsp;&nbsp;
    </span><b><span style='mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:
    "Times New Roman";color:#333333'>关键词:</span></b><span lang=EN-US
    style='color:#333333'>C8051F320</span><span style='color:#333333'>;<span
    lang=EN-US>USB</span>;<span lang=EN-US>USB</span>描述符;固件<span lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>随着USB技术的快速发展以及USB外设在越来越多场合的广泛应用,支持USB接口技术的芯片也越来越多。对于USB接口的设计,如非扩展之用,选用带有MCU的USB控制器当然是设计师们的首选,因为这样不仅可以大大简化硬件电路、减小外设体积,而且还可以提高产品的可靠性。文中介绍的C8051F320就是顺应这种需求而推出的一种新型USB控制器芯片。<span
    lang=EN-US><br>
    <br>
    </span><b>1 C8051F320的主要特点</b><span lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>C8051F320是Cygnal公司推出的一款具有全速USB功能的混合信号flash微控制器芯片,该器件内部集成有2304
    Byte RAM和16k Byte的flash存储器。实际上,C8051F320是一个完整的小型片上系统(SoC)。</span><!--[if gte vml 1]><v:shapetype
     id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
     path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
     <v:stroke joinstyle="miter"/>
     <v:formulas>
      <v:f eqn="if lineDrawn pixelLineWidth 0"/>
      <v:f eqn="sum @0 1 0"/>
      <v:f eqn="sum 0 0 @1"/>
      <v:f eqn="prod @2 1 2"/>
      <v:f eqn="prod @3 21600 pixelWidth"/>
      <v:f eqn="prod @3 21600 pixelHeight"/>
      <v:f eqn="sum @0 0 1"/>
      <v:f eqn="prod @6 1 2"/>
      <v:f eqn="prod @7 21600 pixelWidth"/>
      <v:f eqn="sum @8 21600 0"/>
      <v:f eqn="prod @7 21600 pixelHeight"/>
      <v:f eqn="sum @10 21600 0"/>
     </v:formulas>
     <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
     <o:lock v:ext="edit" aspectratio="t"/>
    </v:shapetype><v:shape id="_x0000_s1026" type="#_x0000_t75" alt="" style='position:absolute;
     left:0;text-align:left;margin-left:193.25pt;margin-top:0;width:233.25pt;
     height:274.5pt;z-index:1;mso-wrap-distance-left:.75pt;
     mso-wrap-distance-top:.75pt;mso-wrap-distance-right:.75pt;
     mso-wrap-distance-bottom:.75pt;mso-position-horizontal:right;
     mso-position-horizontal-relative:text;mso-position-vertical-relative:line'
     o:allowoverlap="f">
     <v:imagedata src="http://www.21ic.com/info/images/iie/200504/16a.gif"/>
     <w:wrap type="square"/>
    </v:shape><![endif]--><![if !vml]><img width=311 height=366
    src="http://www.21ic.com/info/images/iie/200504/16a.gif" align=right
    hspace=1 vspace=1 border=0 onclick="ImgClick(this)"
    onmousewheel="return bbimg(this)" resized=0 v:shapes="_x0000_s1026"><![endif]><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>由于利用该芯片进行设计时可以不需要任何外部元件(包括电阻和晶振),因而是小型USB应用的理想选择。与其它同类产品相比,C8051F320主要具有如下一些特点:<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>●全速的USB 2.0功能控制器;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>●内部集成了时钟恢复电路,且不需要外接晶体振荡器;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>●可支持8个USB端点;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>●带有1k字节的USB缓冲存储器;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>●内部集成了USB接口的数据收发器,设计中无需外部上拉电阻;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>●具有高速增强型8051 MCU内核,该MCU内核采用流水线式指令结构,70%的指令执行时间为一个或两个系统时钟周期,处理速度可达25MIPS(时钟频率为25MHz时)。<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>此外,C8051F320还有许多其它特性,如支持在系统编程(ISP),带有可编程的数字I/O和数字交叉开关,可提供全速、非侵入式的在系统片内调试电路等。<span
    lang=EN-US><br>
    <br>
    </span><b>2 C8051F320的引脚功能</b><span lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>C8051F320的引脚排列如图1所示。主要引脚的功能如下:<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>D+、D-:USB电缆的USB D+和USB
    D-连接端;<span lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>VDD:2.7~3.6V片上电源输入端或片内电压调节器的3.3V输出端;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>REGIN:片内电压调节器的5V输入端;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>VBUS:USB电缆VBUS引线的感应输入端,当该脚出现5V高电平信号时,表示该设备已经和主机连接好;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>RST/C2CK:多功能引脚,内部上电复位POR(Power
    On Reset)和VDD监视器的漏极开路输出,使该脚保持低电平15μs以上可对系统进行一次复位。此外,该脚还可作为C2接口的时钟信号输入端;<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>P3.0/C2D:多功能引脚,可作为I/O端口或C2接口的双向数据信号传输端口。<span
    lang=EN-US><br>
    <br>
    </span><b>3 应用举例</b><span lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>笔者以C8051F320为核心设计了一个USB和CAN总线的接口转换模块,运用该接口转换模块可以方便地把具有USB接口的测控设备连接到一个CAN总线测控网络中,以对系统的运行状况进行系统和整体的测试和分析。</span><!--[if gte vml 1]><v:shape
     id="_x0000_s1027" type="#_x0000_t75" alt="" style='position:absolute;
     left:0;text-align:left;margin-left:172.25pt;margin-top:0;width:212.25pt;
     height:158.25pt;z-index:2;mso-wrap-distance-left:.75pt;
     mso-wrap-distance-top:.75pt;mso-wrap-distance-right:.75pt;
     mso-wrap-distance-bottom:.75pt;mso-position-horizontal:right;
     mso-position-horizontal-relative:text;mso-position-vertical-relative:line'
     o:allowoverlap="f">
     <v:imagedata src="http://www.21ic.com/info/images/iie/200504/16b.gif"/>
     <w:wrap type="square"/>
    </v:shape><![endif]--><![if !vml]><img width=283 height=211
    src="http://www.21ic.com/info/images/iie/200504/16b.gif" align=right
    hspace=1 vspace=1 border=0 onclick="ImgClick(this)"
    onmousewheel="return bbimg(this)" resized=0 v:shapes="_x0000_s1027"><![endif]><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>在该接口转换模块的设计中,最主要的工作就是USB接口部分的设计,包括硬件电路和固件程序的设计。<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>3.1 USB 接口硬件电路设计<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>由于C8051F320微控制器具有简单易用的特点,因此,用C8051F320进行USB接口的硬件设计也显得十分简单,主要包括两部分的内容,一是接口转换模块供电方式的选择,二是USB引脚的连接,图2是其USB接口电路图。<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>由于整个模块的功率估计在3W左右,而USB总线的供电量只适合小功率模块的供电,最大也只有500mA,因此不能满足整个模块的安全供电,所以模块选择自供电模式,图2所示的整个模块(包括C8051F320和模块中所有其它部分)的供电电源都来自外部5V电源。由于C8051F320中的USB收发器内部集成了上拉电阻,因而不需要任何外部器件便可直接与USB接口相连。<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>3.2 USB固件程序设计<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>USB固件程序设计是USB接口部分的主要工作,它的主要目的是:当USB设备连接到主机上时,主机可以发现新设备,然后建立连接并完成数据传输任务,也就是能够让Windows正常检测和识别USB设备。因此在USB固件程序中,最重要的工作就是USB描述符的定义和USB传输中断的处理。<span
    lang=EN-US><o:p></o:p></span></span></p>
    <p style='text-indent:22.5pt;line-height:140%;word-break:break-all'><span
    style='font-size:10.5pt;line-height:140%;color:#333333'>(1)USB描述符<span
    lang=EN-US><o:p></o:p></span></span></p>

⌨️ 快捷键说明

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