亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usb in a nutshell - chapter 7 - pdiusbd11 and pic16f87x example.htm

?? altra下載線資料。max7000系列
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0047)http://www.beyondlogic.org/usbnutshell/usb7.htm -->
<HTML><HEAD><TITLE>USB in a NutShell - Chapter 7 - PDIUSBD11 and PIC16F87x Example</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META 
content="Shows an example Schematic and C Source Code of a PDIUSBD11 I2C USB Device connected to a Microchip PIC16F876 Microcontroller." 
name=description>
<META 
content="PDIUSBD11, PIC16F87x, PIC16F877, PIC16F876, USB, Tutorial, USB Tutorial, USB Primer, Universal Serial Bus, Enumeration, C Source Code, HiTech PICC" 
name=keywords>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY leftMargin=0 
background="USB in a NutShell - Chapter 7 - PDIUSBD11 and PIC16F87x Example.files/bgyellow.gif" 
topMargin=0 FACE="ARIAL" BASEFONT marginwidth="0" marginheight="0">
<STYLE type=text/css>#TITLEBLOCK {
	COLOR: #ffffff; TEXT-DECORATION: none
}
TD {
	FONT-FAMILY: Arial
}
P {
	FONT-FAMILY: Arial
}
FONT {
	FONT-FAMILY: Arial
}
A {
	FONT-FAMILY: Arial
}
LI {
	FONT-FAMILY: Arial
}
B {
	FONT-FAMILY: Arial
}
PRE {
	COLOR: #100080
}
TT {
	COLOR: #100080
}
</STYLE>
<BR>
<CENTER>
<TABLE width="95%" BOARDER="0">
  <TBODY>
  <TR>
    <TD width="25%">
      <CENTER><A href="http://www.beyondlogic.org/"><IMG alt="Beyond Logic" 
      src="USB in a NutShell - Chapter 7 - PDIUSBD11 and PIC16F87x Example.files/beyondsmall.gif" 
      border=0></A></CENTER></TD>
    <TD width="50%">
      <CENTER>
      <SCRIPT type=text/javascript><!--google_ad_client = "pub-7725444460812017";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text_image";google_ad_channel ="";google_color_border = "0033FF";google_color_bg = "FFFFFF";google_color_link = "0000FF";google_color_url = "008000";google_color_text = "000000";//--></SCRIPT>

      <SCRIPT 
      src="USB in a NutShell - Chapter 7 - PDIUSBD11 and PIC16F87x Example.files/show_ads.js" 
      type=text/javascript></SCRIPT>
      <NOSCRIPT><FONT color=red>This page is optimised with JavaScript 1.2. 
      Currently your browser has JavaScript switched off.</NOSCRIPT> 
      </CENTER></FONT></TD>
    <TD vAlign=center align=right><BR><FONT face=ARIAL>
      <SCRIPT language=javascript 
      src="USB in a NutShell - Chapter 7 - PDIUSBD11 and PIC16F87x Example.files/beyondmenu_plain.js"></SCRIPT>
      <NOSCRIPT></FONT></TD></TR></TBODY></TABLE></CENTER></NOSCRIPT>
<CENTER><BR><BR><FONT color=green size=6>USB in a NutShell</FONT><BR><BR><FONT 
color=blue size=4><I>Making Sense of the USB Standard</I></FONT> 
<TABLE width="95%">
  <TBODY>
  <TR>
    <TD>
      <UL><A name=Enumeration><FONT color=green 
        size=3><B>Enumeration</B></FONT></A> 
        <UL>
          <P>Enumeration is the process of determining what device has just been 
          connected to the bus and what parameters it requires such as power 
          consumption, number and type of endpoint(s), class of product etc. The 
          host will then assign the device an address and enable a configuration 
          allowing the device to transfer data on the bus. A fairly generic 
          enumeration process is detailed in section 9.1.2 of the USB 
          specification. However when writing USB firmware for the first time, 
          it is handy to know exactly how the host responds during enumeration, 
          rather than the general enumeration process detailed in the 
          specification. </P>
          <P>A common Windows enumeration involves the following steps, </P>
          <OL>
            <LI>The host or hub detects the connection of a new device via the 
            device's pull up resistors on the data pair. The host waits for at 
            least 100ms allowing for the plug to be inserted fully and for power 
            to stabilise on the device. <BR><BR>
            <LI>Host issues a reset placing the device is the default state. The 
            device may now respond to the default address zero. <BR><BR>
            <LI>The MS Windows host asks for the first 64 bytes of the Device 
            Descriptor. <BR><BR>
            <LI>After receiving the first 8 bytes of the Device Descriptor, it 
            immediately issues another bus reset. <BR><BR>
            <LI>The host now issues a Set Address command, placing the device in 
            the addressed state. <BR><BR>
            <LI>The host asks for the entire 18 bytes of the Device Descriptor. 
            <BR><BR>
            <LI>It then asks for 9 bytes of the Configuration Descriptor to 
            determine the overall size. <BR><BR>
            <LI>The host asks for 255 bytes of the Configuration Descriptor. 
            <BR><BR>
            <LI>Host asks for any String Descriptors if they were specified. 
            </LI></OL>
          <P>At the end of Step 9, Windows will ask for a driver for your 
          device. It is then common to see it request all the descriptors again 
          before it issues a Set Configuration request. </P>
          <P>The above enumeration process is common to Windows 2000, Windows XP 
          and Windows 98 SE. </P>
          <P>Step 4 often confuses people writing firmware for the first time. 
          The Host asks for the first 64 bytes of the device descriptor, so when 
          the host resets your device after it receives the first 8 bytes, it is 
          only natural to think there is something wrong with your device 
          descriptor or how your firmware handles the request. However as many 
          will tell you, if you keep persisting by implementing the Set Address 
          Command it will pay off by asking for a full 18 bytes of device 
          descriptor next. </P>
          <P>Normally when something is wrong with a descriptor or how it is 
          being sent, the host will attempt to read it three times with long 
          pauses in between requests. After the third attempt, the host gives up 
          reporting an error with your device. </P></UL><A 
        name=PIC16F876Example><FONT color=green size=3><B>Firmware - PIC16F876 
        controlling the PDIUSBD11</B></FONT></A> 
        <UL>
          <P>We start our examples with a Philip's PDIUSBD11 I2C Serial USB 
          Device connected to a MicroChip PIC16F876 (shown) or a Microchip 
          PIC16F877 (Larger 40 Pin Device). While Microchip has got two low 
          speed USB PIC16C745 and PIC16C765 devices out now, they are only OTP 
          without In-Circuit Debugging (ICD) support which doesn't help with the 
          development flow too well. They do have <A 
          href="http://www.beyondlogic.org/usb/usbhard.htm#Microchip">four new 
          full speed flash devices</A> with (ICD) support coming. In the mean 
          time the Philips PDIUSBD11 connected to the PIC16F876 which gives the 
          advantage of Flash and In-Circuit Debugging. </P>
          <CENTER><A 
          href="http://www.beyondlogic.org/usbnutshell/pic16f876.gif"><IMG 
          src="USB in a NutShell - Chapter 7 - PDIUSBD11 and PIC16F87x Example.files/pic16f876thumb.gif" 
          border=0></A> <BR><A 
          href="http://www.beyondlogic.org/usbnutshell/pic16f876.gif">Click here 
          to enlarge</A></CENTER>
          <P>A schematic of the required hardware is shown above. The example 
          enumerates and allows analog voltages to be read from the five 
          multiplexed ADC inputs on the PIC16F876 MCU. The code is compatible 
          with the PIC16F877 allowing a maximum of 8 Analog Channels. A LED 
          connected on port pin RB3 lights when the device is configured. A 3.3V 
          regulator is not pictured, but is required for the PDIUSBD11. If you 
          are running the example circuit from an external power supply, then 
          you can use a garden variety 78L033 3.3V voltage regulator, however if 
          you wish to run the device as a Bus Powered USB device then a low 
          dropout regulator needs to be sought. </P>
          <P>Debugging can be done by connecting TXD (Pin 17) to a RS-232 Line 
          Driver and fed into a PC at 115,200bps. Printf statements have been 
          included which display the progress of enumeration. </P>
          <P>The code has been written in C and compiled with the <A 
          href="http://www.htsoft.com/">Hi-Tech PICC Compiler</A>. They have a 
          <A href="http://www.htsoft.com/software/index.html">demo version (7.86 
          PL4)</A> of the PICC for download which works for 30 days. A 
          pre-compiled .HEX file has be included in the archive which has been 
          compiled for use with (or without) the ICD. </P><PRE>#include &lt;pic.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include "usbfull.h"

const USB_DEVICE_DESCRIPTOR DeviceDescriptor = {
    sizeof(USB_DEVICE_DESCRIPTOR), /* bLength */
    TYPE_DEVICE_DESCRIPTOR,        /* bDescriptorType */
    0x0110,                        /* bcdUSB USB Version 1.1 */
    0,                             /* bDeviceClass */
    0,                             /* bDeviceSubclass */
    0,                             /* bDeviceProtocol */
    8,                             /* bMaxPacketSize 8 Bytes */
    0x04B4,                        /* idVendor (Cypress Semi) */
    0x0002,                        /* idProduct (USB Thermometer Example) */
    0x0000,                        /* bcdDevice */
    1,                             /* iManufacturer String Index */
    0,                             /* iProduct String Index */
    0,                             /* iSerialNumber String Index */
    1                              /* bNumberConfigurations */
};
</PRE>
          <P>The structures are all defined in the header file. We have based 
          this example on the Cypress USB Thermometer example so you can use our 
          <A href="http://www.beyondlogic.org/usb/cypress.htm">USB Driver for 
          the Cypress USB Starter Kit</A>. A new generic driver is being written 
          to support this and other examples which will be available soon. Only 
          one string is provided to display the manufacturer. This gives enough 
          information about how to implement string descriptors without filling 
          up the entire device with code. A description of the Device Descriptor 
          and its fields can be found <A 
          href="http://www.beyondlogic.org/usbnutshell/usb5.htm#DeviceDescriptors">here.</A> 
          </P><PRE>const USB_CONFIG_DATA ConfigurationDescriptor = {
    {                              /* configuration descriptor */
    sizeof(USB_CONFIGURATION_DESCRIPTOR), /* bLength */
    TYPE_CONFIGURATION_DESCRIPTOR, /* bDescriptorType */
    sizeof(USB_CONFIG_DATA),       /* wTotalLength */
    1,                             /* bNumInterfaces */
    1,                             /* bConfigurationValue */
    0,                             /* iConfiguration String Index */
    0x80,                          /* bmAttributes Bus Powered, No Remote Wakeup */
    0x32                           /* bMaxPower, 100mA */ 
    },
    {                              /* interface descriptor */
    sizeof(USB_INTERFACE_DESCRIPTOR), /* bLength */
    TYPE_INTERFACE_DESCRIPTOR,     /* bDescriptorType */
    0,                             /* bInterface Number */
    0,                             /* bAlternateSetting */
    2,                             /* bNumEndpoints */
    0xFF,                          /* bInterfaceClass (Vendor specific) */
    0xFF,                          /* bInterfaceSubClass */
    0xFF,                          /* bInterfaceProtocol */
    0                              /* iInterface String Index */
    },
    {                              /* endpoint descriptor */
    sizeof(USB_ENDPOINT_DESCRIPTOR),  /* bLength */
    TYPE_ENDPOINT_DESCRIPTOR,      /* bDescriptorType */
    0x01,                          /* bEndpoint Address EP1 OUT */
    0x02,                          /* bmAttributes - Interrupt */
    0x0008,                        /* wMaxPacketSize */
    0x00                           /* bInterval */
    },
    {                              /* endpoint descriptor */
    sizeof(USB_ENDPOINT_DESCRIPTOR),  /* bLength */
    TYPE_ENDPOINT_DESCRIPTOR,      /* bDescriptorType */
    0x81,                          /* bEndpoint Address EP1 IN */
    0x02,                          /* bmAttributes - Interrupt */
    0x0008,                        /* wMaxPacketSize */
    0x00                           /* bInterval */
    }
};
</PRE>
          <P>A description of the Configuration Descriptor and its fields can be 
          found <A 
          href="http://www.beyondlogic.org/usbnutshell/usb5.htm#ConfigurationDescriptors">here.</A> 
          We provide two endpoint descriptors on top of the default pipe. EP1 
          OUT is an 8 byte maximum Bulk OUT Endpoint and EP1 IN is an 8 byte max 
          Bulk IN Endpoint. Our example reads data from the Bulk OUT endpoint 
          and places it in an 80 byte circular buffer. Sending an IN packet to 
          EP1 reads 8 byte chunks from this circular buffer. </P><PRE>LANGID_DESCRIPTOR LANGID_Descriptor = { /* LANGID String Descriptor Zero */
    sizeof(LANGID_DESCRIPTOR),          /* bLenght */
    TYPE_STRING_DESCRIPTOR,             /* bDescriptorType */
    0x0409                              /* LANGID US English */
};

const MANUFACTURER_DESCRIPTOR Manufacturer_Descriptor = { /* ManufacturerString 1 */
    sizeof(MANUFACTURER_DESCRIPTOR),                      /* bLenght */
    TYPE_STRING_DESCRIPTOR,                               /* bDescriptorType */
    "B\0e\0y\0o\0n\0d\0 \0L\0o\0g\0i\0c\0"                /* ManufacturerString in UNICODE */
};
</PRE>
          <P>A Zero Index <A 
          href="http://www.beyondlogic.org/usbnutshell/usb5.htm#StringDescriptors">String 
          Descriptor</A> is provided to support the LANGID requirements of USB 
          String Descriptors. This indicates all descriptors are in US English. 
          The Manufacturer Descriptor can be a little deceiving as the size of 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产婷婷国产香蕉| 国产精品久久久久精k8| 色哟哟在线观看一区二区三区| 国产一区二区三区在线观看精品| 午夜精品免费在线| 亚洲一区二区在线免费观看视频| √…a在线天堂一区| 国产精品网站在线观看| 成人免费在线播放视频| 亚洲精品成人悠悠色影视| 一区二区在线观看视频| 亚洲线精品一区二区三区八戒| 亚洲一区二区三区爽爽爽爽爽| 亚洲一区av在线| 奇米777欧美一区二区| 久久99国产精品免费网站| 国产揄拍国内精品对白| 成人av在线一区二区三区| 91美女在线视频| 欧美日韩精品三区| 欧美大片国产精品| 国产精品视频一二| 樱桃视频在线观看一区| 日本午夜精品一区二区三区电影| 日本麻豆一区二区三区视频| 国产精品综合二区| 91福利在线看| 久久综合色之久久综合| 中文字幕亚洲成人| 青青草一区二区三区| 成人av网在线| 欧美一区二区三区小说| 国产精品网站导航| 奇米精品一区二区三区在线观看一| 国产精品一区二区91| 欧美日韩一区成人| 久久久av毛片精品| 亚洲第一福利视频在线| 国产凹凸在线观看一区二区| 日本精品免费观看高清观看| 日韩精品一区二区三区视频播放 | 亚洲电影你懂得| 国内精品视频666| 色哟哟国产精品| 久久久一区二区| 日韩激情一区二区| 成人黄色网址在线观看| 欧美videos中文字幕| 亚洲永久精品国产| 成人激情黄色小说| 欧美成人欧美edvon| 亚洲va国产va欧美va观看| a在线播放不卡| 2014亚洲片线观看视频免费| 亚洲成人免费影院| 在线精品观看国产| 国产精品视频你懂的| 国产一区二区三区久久久 | 精品国产亚洲一区二区三区在线观看| 国产精品久久久久久久久晋中| 青草av.久久免费一区| 欧美亚洲精品一区| 亚洲男人电影天堂| 91蜜桃视频在线| 成人免费在线播放视频| 懂色av一区二区三区免费观看| 精品久久一二三区| 麻豆久久一区二区| 日韩欧美一区二区免费| 日日噜噜夜夜狠狠视频欧美人| 在线精品观看国产| 亚洲成a人v欧美综合天堂下载| 色婷婷综合久久久久中文一区二区| 久久精品夜夜夜夜久久| 国产一区二区不卡| 中文字幕欧美日本乱码一线二线 | 国产亚洲污的网站| 狠狠色狠狠色综合系列| 精品国免费一区二区三区| 美女任你摸久久| 精品免费国产二区三区| 国产一区二区在线观看视频| 精品国产自在久精品国产| 精品亚洲国内自在自线福利| 日韩女优av电影| 国产精品18久久久久久久久久久久 | 欧美一级黄色片| 久久精品国产精品青草| 久久亚洲精精品中文字幕早川悠里| 国产麻豆成人传媒免费观看| 欧美极品xxx| 日本高清不卡aⅴ免费网站| 亚洲一区二区中文在线| 欧美一级夜夜爽| 国产精品主播直播| 亚洲视频中文字幕| 欧美日韩在线播| 精品午夜久久福利影院| 国产精品久久久久9999吃药| 色婷婷综合久久久久中文一区二区 | 亚洲日本va午夜在线影院| 欧美性高清videossexo| 久久99国产精品久久99| 国产精品国产三级国产普通话蜜臀 | 天天影视色香欲综合网老头| 欧美一级理论性理论a| 国产成a人无v码亚洲福利| 亚洲精品成a人| 日韩免费观看2025年上映的电影| 国产伦精品一区二区三区免费| 亚洲欧美日韩国产成人精品影院| 555www色欧美视频| www.欧美.com| 免播放器亚洲一区| 国产精品美女一区二区在线观看| 精品视频免费看| 国产成人免费在线观看不卡| 亚洲伊人色欲综合网| 国产区在线观看成人精品| 欧美在线观看视频在线| 国产很黄免费观看久久| 日精品一区二区| 亚洲精品中文字幕在线观看| 久久综合九色综合97婷婷| 欧美日韩在线电影| 99久久久久久| 国产成人精品一区二区三区四区 | 狠狠色丁香婷婷综合| 一区二区三区四区精品在线视频| 精品国精品国产| 91精品在线麻豆| 91福利资源站| 色综合天天狠狠| 大桥未久av一区二区三区中文| 日本三级韩国三级欧美三级| 亚洲一区二三区| 一区二区三区不卡视频| 中文字幕在线一区免费| 久久美女艺术照精彩视频福利播放 | 18成人在线视频| 一区在线观看免费| 日本一区二区免费在线| 久久噜噜亚洲综合| 精品国产乱码久久久久久老虎| 欧美日韩黄色影视| 欧美日韩一卡二卡| 欧美午夜精品久久久久久孕妇| av在线不卡网| a亚洲天堂av| 91丨porny丨户外露出| 成人va在线观看| 97se狠狠狠综合亚洲狠狠| 成人av在线电影| 91首页免费视频| 日本精品一区二区三区四区的功能| 不卡的av电影在线观看| 99在线热播精品免费| 91在线观看下载| 色悠悠亚洲一区二区| 91福利在线观看| 欧美精品久久一区二区三区| 欧美男男青年gay1069videost| 精品婷婷伊人一区三区三| 正在播放亚洲一区| 欧美r级在线观看| 国产三级一区二区| 综合久久给合久久狠狠狠97色| 综合中文字幕亚洲| 亚洲一区二区免费视频| 午夜精品久久久久久久99樱桃| 免费成人性网站| 成人av综合一区| 欧美日韩亚洲不卡| 久久综合九色欧美综合狠狠 | 青椒成人免费视频| 国产成人亚洲精品青草天美| caoporn国产精品| 欧美三级日本三级少妇99| 日韩视频免费直播| 国产精品黄色在线观看| 午夜精品爽啪视频| 国产成人一区在线| 欧美亚洲自拍偷拍| 久久日韩粉嫩一区二区三区 | 欧美成人精品1314www| 中文久久乱码一区二区| 香蕉成人啪国产精品视频综合网 | 亚洲国产精品欧美一二99| 美女视频黄免费的久久 | 亚洲国产一区二区三区| 精品在线播放免费| 91视频在线观看免费| 日韩午夜激情电影| 一区精品在线播放| 久久99精品久久久久久动态图| 91亚洲大成网污www| 亚洲精品一区二区三区精华液| 亚洲自拍另类综合| 99在线热播精品免费| 久久这里只有精品6|