DM163010 Microchip Technology, DM163010 Datasheet - Page 51

BOARD DEMO PICDEM USB

DM163010

Manufacturer Part Number
DM163010
Description
BOARD DEMO PICDEM USB
Manufacturer
Microchip Technology
Datasheet

Specifications of DM163010

Processor To Be Evaluated
PlC16C745/765
Interface Type
USB
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
4.9
©
2001 Microchip Technology Inc.
Optimizing the Firmware
4.9.1
4.9.2
4.9.3
The host requests the descriptors by specifying the type of descriptor it wants
and an index value. If more than one configuration descriptor exists, it will
request the first one by specifying an index of zero and the second, by speci-
fying an index of one. To make this process as easy as possible for develop-
ers, the functions Config_descr_index and Report_descr_index have been
created in descript.asm. These functions will need to be modified if your
code has more than one configuration, or more than one report descriptor. All
you need to do is specify the starting label for additional descriptors in the
lookup table for these functions.
This firmware has been created to provide developers with ready-made USB
functions, so they don’t have to create these functions for themselves. Most
developers will not utilize all of the functions in the Ch9 firmware. In order to
optimize the program memory, unused functions can be taken out of the firm-
ware. The following guidelines are a good place to start the optimization.
USB Status on PORTB
The firmware outputs the status of USB communication on PORTB. This fea-
ture is intended for use with the PICDEM™ USB circuit board, which drives an
LED with each PORTB pin. The LEDs indicate the following USB status infor-
mation: RB0 – powered, RB1 – default, RB2 – addressed, RB3 – configured,
RB4 – sleeping, RB5 – EP0 active, RB6 – EP1 active, RB7 – EP2 active.
Obviously, these USB status indicators will probably not be used in a finished
product by a developer, although they are very helpful during development. All
code associated with the USB status LEDs can be eliminated from the pro-
gram memory by ensuring that SHOW_ENUM_STATUS is not defined at the
top of usb_ch9.asm.
Error Counter
Similar to the USB status LEDs, code exists in the firmware that counts vari-
ous errors for debugging purposes. Program memory space can be saved by
making sure that COUNTERRORS is not defined.
GetEP1, GetEP2, PutEP1, and PutEP2
These functions are all macros defined in usb_defs.inc. Instances of each
of these macros occur in usb_ch9.asm. If a developer does not utilize one or
more of these functions, space can be saved by removing the instance(s) not
needed from usb_ch9.asm.
Note:
String descriptors also use an index function, string_index (in
descript.asm). This function will need to be modified in the
same manner if your code has a number of strings other than six.
Chapter 9 USB Firmware
DS41174A-page 47

Related parts for DM163010