参数资料
型号: DM163010
厂商: Microchip Technology
文件页数: 29/80页
文件大小: 0K
描述: BOARD DEMO PICDEM USB
标准包装: 1
USB Demonstration Code
There is no way to tell what endpoint a report descriptor is associated with by
looking at the report descriptor. In other words, unlike other descriptor types,
report descriptors do not have a field that identifies them as a report descrip-
tor. Nor do report descriptors have an index number that distinguishes one
from another. Report descriptors are associated with the appropriate endpoint
in the firmware with the use of a Report Descriptor Index.
Looking at Figure 2.5 again, you can see that HID1 is associated with
endpoint1 and that HID1 specifies that it has a report descriptor. The host
assigns this report descriptor an index value of 0 (this is a zero based array),
simply because the HID1 descriptor is the first descriptor sent to the host that
specifies a report descriptor. Similarly, the host assigns the report descriptor
specified by HID2 an index value of 1. The host keeps track of what descrip-
tors branch off a particular interface, therefore, the host is able to deduce that
report descriptors with indexes 0 and 1 are describing the communication that
will take place over endpoint1 and endpoint2, respectively. The host will call
these report descriptors with the Get_Report_Descriptor request. As part of
this request, the host specifies the index number of the descriptor it desires.
It's up to the developer to make sure that Report Descriptor 1 is sent to the
host when index 0 is specified in the request, and Report Descriptor 2 is sent
to the host when index 1 is specified. To make this process as painless as
possible, the Report Descriptor Index in file descript.asm was created. In
this index, all that is needed, is for you to list the labels of your report descrip-
tors in the order that the corresponding HID descriptors are sent to the host.
2.4
Multi-Function LCD Text Display Example
2.4.1
2.4.2
2001 Microchip Technology Inc.
Introduction
USB endpoints can be used to send data from the host as well as receive
data from a device. In this example, a simple vendor defined protocol is used
to draw text on the LCD. Additional commands are provided to move the cur-
sor around, clear the screen, download custom font characters, send data
through the serial port, and light LED’s on PORTB. This example does not
use the alphanumeric HID class defined by the USB-IF. This example used
the second endpoint to provide additional functionality. The second endpoint
will receive serial data from the UART and read the analog-to-digital
converter.
Hardware Implementation
The hardware is simply the PICDEM? USB with an LCD character module
attached to the LCD connector. The LCD control signals are PORTE, while the
data is PORTD. Provision is in place for backlight power on the PICDEM?
USB, but backlight control is not provided. If you use an LCD with an LED
backlight, your board could draw slightly more than 100 mA. Fortunately, cur-
rent PC drivers will not shut-down the device for using too much current,
unless the current draw from all the USB ports or a hub exceeds 500 mA.
Future PC drivers may require additional power management capabilities.
DS41174A-page 25
相关PDF资料
PDF描述
DM163012 BOARD DEMO PICDEM FOR 16C781/782
DM163024 BOARD DEMO PICDEM.NET 2
DM163025 PIC DEM FULL SPEED USB DEMO BRD
DM163028 BOARD DEMO PICDEM LCD
DM163029 BOARD PICDEM FOR MECHATRONICS
相关代理商/技术参数
参数描述
DM163010 制造商:Microchip Technology Inc 功能描述:DEMONSTRATION BOARD ((NW))
DM163011 功能描述:开发板和工具包 - PIC / DSPIC For PIC18FXX8 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163011 制造商:Microchip Technology Inc 功能描述:DEVELPMENT TOOLS ((NW))
DM163012 功能描述:开发板和工具包 - PIC / DSPIC For PIC16C781/782 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163014 功能描述:开发板和工具包 - PIC / DSPIC PICDEM 4 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: