Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, KEELOQ logo, microID, MPLAB, PIC,
PICmicro, PICSTART, PRO MATE, rfPIC and SmartShunt are
registered trademarks of Microchip Technology Incorporated
in the U.S.A. and other countries.
AmpLab, FilterLab, Linear Active Thermistor, Migratable
Memory, MXDEV, MXLAB, SEEVAL, SmartSensor and The
Embedded Control Solutions Company are registered
trademarks of Microchip Technology Incorporated in the
U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, FlexROM, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi,
MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit,
PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal,
PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, Select
Mode, Smart Serial, SmartTel, Total Endurance, UNI/O,
WiperLock and ZENA are trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available on-line help files.
®
IDE on-line help.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PIC18F87J50 FS USB Plug-In Module. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This document describes how to use the PIC18F87J50 FS USB Plug-In Module. The
manual layout is as follows:
This user's guide describes how to use PIC18F87J50 FS USB Plug-In Module. Other
useful documents are listed below. The following Microchip documents are available
and recommended as supplemental reference resources.
PIC18F87J50 Family Data Sheet (DS39775)
MCHPFSUSB Firmware User’s Guide (DS51679)
PICDEM™ FS USB Demonstration Board User’s Guide (DS51526)
USB related application notes, firmware and other resources will be posted at the
Microchip full-speed USB design center:
http://www.microchip.com/usb/ (click on the “Full-Speed USB Solutions” link)
Schematics and other support materials for the HPC Explorer board can be obtained at:
http://www.microchip.com/HPCExplorer
In addition to Microchip documents, the official USB 2.0 specifications are of particular
interest. These can be obtained from the USB Implementer’s Forum:
http://www.usb.org
Chapter 9 of the official USB 2.0 specifications is especially important, as it strongly
influences the development of USB firmware.
Preface
THE MICROCHIP WEB SITE
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip
products. Subscribers will receive e-mail notification whenever there are changes,
updates, revisions or errata related to a specified product family or development tool of
interest.
To register, access the Microchip web site at www.microchip.com, click on Customer
Change Notification and follow the registration instructions.
The Development Systems product group categories are:
• Compilers – The latest information on Microchip C compilers and other language
tools. These include the MPLAB C18 and MPLAB C30 C compilers; MPASM™
and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object linkers;
and MPLIB™ and MPLAB LIB30 object librarians.
• Emulators – The latest information on Microchip in-circuit emulators.This
includes the MPLAB ICE 2000 and MPLAB ICE 4000.
• In-Circuit Debuggers – The latest information on the Microchip in-circuit
debugger, MPLAB ICD 2.
• MPLAB
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager
and general editing and debugging features.
• Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 and PRO MATE
Plus and PICkit™ 1 development programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
®
II device programmers and the PICSTART®
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com
The PIC18F87J50 FS USB Plug-In Module (PIM) Demonstration Board and Kit is
designed as an easy-to-use evaluation platform for Microchip's Full-Speed USB
PIC18F87J50 family of microcontrollers. The PIM may be operated either stand-alone,
or in conjunction with the HPC Explorer board (microchipDIRECT part number
DM183022).
These devices fully support USB 2.0 full-speed and low-speed serial communications
at signaling speeds of 12 Mbit/s or 1.5 Mbit/s. The demonstration kit provides all of the
hardware and software needed to develop officially compliant USB communication
solutions.
1.2HIGHLIGHTS
Items discussed in this chapter include:
• PIC18F87J50 FS USB Plug-In Module Kit Contents
• Overview of the PIC18F87J50 Family USB Capabilities
• Using the Preprogrammed Firmware
PIC18F87J50 FS USB
PLUG-IN MODULE
USER’S GUIDE
1.3PIC18F87J50 FS USB PLUG-IN MODULE KIT CONTENTS
The Demonstration Kit contains the following items:
1. The PIC18F87J50 FS USB Plug-In Module demonstration board,
preprogrammed with USB Human Interface Device (HID) class mouse
demonstration firmware.
2. A standard USB mini-B cable for power and communication.
3. The PICDEM™ FS USB Starter Kit CD-ROM, containing USB firmware projects,
Microchip's custom class USB driver and USB-specific documentation, such as
this user's guide.
1.4OVERVIEW OF THE PIC18F87J50 FAMILY USB CAPABILITIES
The PIC18F87J50 microcontroller is the “superset” device in the PIC18F87J50 microcontroller family. The PIC18F87J50 has the highest memory and pin count in the family,
but otherwise shares an identical feature set (except features which require pins not
present on 64-pin devices) compared to the other devices. All of the devices in the family are code-compatible with each other and share the same USB capabilities:
• USB 2.0 compliance
• Full-speed (12 Mbit/s) and low-speed (1.5 Mbit/s) operation
• Support of control, interrupt, bulk and isochronous transfers
• Support of up to 32 endpoints
• 3.9 Kbytes of dual access RAM for USB or general purpose use
• On-chip features for a single chip USB implementation, including:
- USB Serial Interface Engine (SIE)
- USB transceiver
- USB pull-up resistors
- D+ and D- driver output impedance matching resistors
1.5USING THE PREPROGRAMMED FIRMWARE
The PIC18F87J50 FS USB Plug-In Module comes preprogrammed with HID class
firmware. Upon plugging in the USB cable to a Windows
PC, the device should automatically enumerate as a HID class mouse. The mouse
cursor should promptly begin moving around in a continuous circular pattern, and the
red LEDs on the PIM should begin blinking in an alternate manner. To stop the mouse
cursor from moving, simply press the “S4” push button located in the lower right corner
of the PIM. If the LEDs fail to illuminate, the device fails to enumerate or the mouse
does not move in a circle, verify that jumpers, JP4 and JP5, are installed. See
Figure 3-1 for the locations of these components.
If the PIM will be used with the HPC Explorer board, be sure to set switch, S3, on the
HPC Explorer to the “ICE” position PRIOR TO INSTALLING THE PIM. When the
switch is in the ICE position, the MCLR
on the HPC Explorer, will be held low. Additionally, V
PIC18F8722. This is intended to prevent simultaneous code execution on both the
microcontroller located on the HPC Explorer board and on the PIM. Almost all of the
I/O pins on the PIM are directly connected to the same I/O pins on the PIC18F8722 of
the HPC Explorer board. For example, when the two boards are connected together,
microcontroller pin, RD0 on the PIC18F87J50 FS USB PIM, is directly connected to the
RD0 pin on the PIC18F8722, as well as one of the green LEDs on the HPC Explorer
board.
If both microcontrollers could execute code simultaneously, I/O pins configured as outputs could easily result in I/O pin contention and possible device damage. To prevent
this potential condition, the S3 switch on the HPC Explorer board should always be in
the “ICE” position when a PIM is installed.
The “P4” pin on the PIC18F87J50 FS USB Plug-In Module is intended to physically
interfere with switch, S3, on the HPC Explorer board. If the switch is not in the correct
position, the PIM will not sit fully seated. To avoid physically damaging the PIM or the
HPC Explorer board, never use excessive force when installing the PIM, and always
check that switch S3 on the HPC Explorer board is in the correct position.
The PIC18F87J50 FS USB PIM has been specifically designed to work either
stand-alone or while plugged into the HPC Explorer board, revision 5. HPC Explorer
revision 4 boards will also work, although capacitor, C3, may be too tall to allow the PIM
to sit fully seated. The interference should not be enough to prevent electrical connectivity, but if it does, it is recommended to replace C3 with a physically smaller
capacitor. The HPC Explorer revision number can be found etched in the copper on the
bottom side of the PCB just underneath the 9-pin serial port connector.
The PIC18F87J50 microcontroller located on the PIM may be reprogrammed in excess
of 10,000 cycles. The PIM is too small to feature a full size RJ11 jack used on most
Microchip demonstration boards. Instead, the PIM uses a 6-pin right angle male header
(J5) which is electrically compatible with common Microchip programmers, such as the
MPLAB
When the PIM is mated to the HPC Explorer board, it may be reprogrammed and
debugged directly through the modular RJ11 jack found on the HPC Explorer board.
When operated stand-alone, the PIM can be reprogrammed/debugged with programmers like the ICD 2 or REAL ICE in-circuit emulator via a modular RJ11 to ICSP™
(6-pin female header) adapter board. This adapter board can be ordered online from
www.microchipDIRECT.com, part number AC164110. This adapter board also comes
as part of the REAL ICE In-Circuit Emulator Performance Pak, microchipDIRECT part
number AC244002. When plugging the adapter board into the PIM, the silk screen
layer on both boards should face up. On the silk screens of each board, a small square
surrounds pin 1 (MCLR
2.4MIGRATING TO THE PIC18F87J50 FAMILY
The PIC18F87J50 family of microcontrollers offers a number of enhancements and
new features compared to previous PIC18 devices. Most changes require no modifications to user firmware, however, this section highlights key items that deserve special
attention.
®
ICD 2 and the MPLAB REAL ICE™ in-circuit emulator.
pin) on both the adapter board and PIM; these should line up.
2.4.1Special Function Register Addressing
The PIC18F87J50 family devices are very peripheral rich and consequently have more
Special Function Registers (SFRs) than will fit in the access portion of Bank 15. Some
of the new SFRs have been placed in the non-access portion of Bank 15 (addresses:
F40h to F5Fh inclusive). Some of the USB Control registers are located in the
non-access portion of Bank 15. See Section 5.3 “Data Memory Organization” in the
“PIC18F87J50 Family Data Sheet” (DS39775) for more details regarding these
changes.
In addition to the new Bank 15 SFRs, some of the new SFRs have been located in a
shadow space sharing the same addresses as other access bank SFRs. These
shadow space registers are only accessible when the WDTCON<ADSHR> bit has
been configured correctly.
When attempting to access the shadow space registers in either assembly or C18,
user firmware should be careful to keep track of, and manually control, the
WDTCON<ADSHR> bit.
When using Microchip’s C18 compiler, no source code changes will be needed to
address the non-access Bank 15 SFRs. The C18 compiler has awareness of these
new SFR locations and will automatically use the proper addressing modes to access
these registers.
The USB module on the PIC18F87J50 family of microcontrollers is compatible with
previous full-speed USB products, such as the PIC18F4550 family and PIC18F4450
family. The USB registers and bits within those registers retain the same names across
these families, so USB firmware can be ported between the devices with little or no
changes.
The PIC18F87J50 family devices use the same 96 MHz PLL found in prior full-speed
USB microcontrollers, such as the PIC18F4550, but the implementation of the surrounding clock structure is slightly different. When migrating up to the PIC18F87J50 family of
devices, the most important change is the PLL does not automatically start when the
microcontroller is powered on, even if it is programmed to use one of the PLL-enabled
modes (e.g., HS+PLL). This allows the microcontroller to start up at less than the
maximum operating frequency. This can potentially be advantageous when running from
a decaying power source (such as a battery), where the applied voltage may not be
adequate for maximum frequency operation. For applications such as these, the
WDTCON<LVDSTAT> bit can be polled to determine if firmware can safely switch to
maximum frequency operation.
After the Power-up Timer expires and the microcontroller begins code execution, the
OSCTUNE<PLLEN> bit must be set by user firmware to activate the PLL (in
PLL-enabled modes). The PLL requires up to 2 ms to lock, during which time, the
microcontroller continues to execute code at the PLL-disabled frequency. User firmware should not attempt to enable the USB module by setting the UCON<USBEN> bit
until after the PLL has locked (unless the PLL is not being used to derive the USB
module clock).
2.4.3Input Buffer Selection
The PIC18F87J50 family of microcontrollers offers more flexibility compared to
previous PIC18 devices when selecting which I/O pins should use analog input buffers,
and which ones should use digital input buffers. Previous PIC18 microcontrollers used
the ADCON1 register to control this function, but the PIC18F87J50 family devices use
two new registers, ANCON0 and ANCON1, for this purpose. These new registers allow
the PIC18F87J50 family of microcontrollers to individually and independently select
which ANx pins should use digital or analog input buffers. See the Analog-to-Digital
converter chapter in the device data sheet for more details.
The PIC18F87J50 FS USB PIM has a number of hardware features intended to
make it useful as an initial development platform and demonstration board. Refer to
Appendix A. “PIC18F87J50 FS USB Plug-In Module Schematics” for schematics of
the PIM. The board offers the following hardware features:
1. 12 MHz miniature surface-mounted crystal.
2. 3.3V low IQ LDO linear regulator.
3. 2 bright red miniature LEDs (attached to I/O pins, RE0 and RE1).
4. MCLR
5. General purpose push button (attached to I/O pin, RB4).
6. ICSP™ programming and debug 6-pin header.
7. USB mini-B connector.
8. Jumpers for added configurability (JP1, JP4, JP5).
9. Test points for convenient V
Figure 3-1 shows where these key components are located on the PIM with item
numbers corresponding to the above list.
In order to use the USB module on the PIC18F87J50 family of microcontrollers, the
module requires a fixed 48 MHz or 6 MHz clock for use in Full-Speed or Low-Speed
modes, respectively. These clock frequencies can be derived from the internal 96 MHz
PLL, and the microcontroller core need not run at the same frequency as the USB
module. In order to use the 96 MHz PLL, a clock source which is an integer multiple of
4 MHz is required. A 12 MHz crystal is included on the board for this purpose.
On the PIC18F87J50 microcontroller, the oscillator pins (RA6 and RA7) route directly
to the 12 MHz crystal. Unlike most other I/O pins, these do not route directly to the “ICE
Module” female headers. Two resistor pads can be used to connect RA6 and RA7 to
the female header pins, but by default, these are left unpopulated. This is done to
prevent “crystal contention” between the 12 MHz crystal on the PIM and the 10 MHz
crystal on the HPC Explorer board.
The USB interface provides +5V (nominal) at up to 500 mA (only 100 mA can be
ensured) for use by USB peripheral devices. In order to take advantage of this bus
provided power, a 3.3V low drop out, low quiescent current linear regulator
(TC1108-3.3VDB) has been included on the PIM. This enables the PIM to be purely bus
powered, providing power to both the PIM and the HPC Explorer board if connected.
Alternatively, when used in conjunction with the HPC Explorer, the PIM may obtain
power from the HPC board. When a suitable power source is connected to power jack,
J1 on the HPC Explorer board, the board will natively produce a regulated 5V provided
by the on-board adjustable linear regulator. When a PIM requiring 3.3V (such as the
PIC18F87J50 FS USB PIM) is plugged in, resistor, R2, located on the PIM alters the
feedback circuit of the adjustable linear regulator and configures it to produce 3.3V.
Therefore, no soldering or other modification is required to either the HPC Explorer or
the PIC18F87J50 FS USB PIM when they are used together.
Jumper, JP4, on the PIM serves two main purposes. JP4 is located in series with the
+5V V
BUS supply from the USB cable to the rest of the PIM board (see Figure A-1 for
exact electrical location). In this location, the jumper cap can be removed, and a digital
current meter can be inserted across the posts of the header. This can be quite useful
during development, as it offers a means of determining how much current the application (both the PIM and the HPC Explorer board if connected) is actively consuming from
the USB port. This is especially important when developing bus powered USB
applications that are intended to be fully USB compliant.
All USB devices are supposed to implement a low-power USB Suspend mode. The
host PC may, at its own discretion, halt all USB traffic (including Start-of-Frame
packets) to your device for more than 3 ms. Upon detecting this condition, the USB
peripheral device should drop to a low-power suspend state, whereby it draws no more
than 500 μA (or in some cases, 2.5 mA; see the USB 2.0 specifications section 7.2.3)
from the +5V V
useful for detecting when the low-power suspend condition is supposed to begin and
when it ends. The TC1108-3.3VDB linear regulator was chosen for its low dropout, low
quiescent current consumption and good transient response capability.
BUS supply. Two USB interrupts, UIR<IDLEIF> and UIR<ACTVIF>, are
In addition to providing a convenient location for installing a digital current meter, JP4
also serves another purpose. In some cases, it may be undesirable to consume power
from the USB port, for example, when developing end applications that are always
self-powered or consume more than 300 mA (the maximum rating for the regulator). In
these cases, jumper cap, JP4, can be removed, and the PIM can obtain power from the
HPC Explorer board or directly from the test points.
Diode, D2, prevents the PIM from ever sourcing current onto the +5V V
USB cable. The USB 2.0 specifications require that USB peripherals should never
source current onto the +5V V
3.5LEDs
Two high-efficiency, red LEDs have been included on the PIM. The LEDs are
connected to I/O pins, RE0 and RE1, and may be used for general purpose indication.
The LEDs are connected such that they turn on when the I/O pin controlling them is
driven high. Alternatively, if the I/O pin loading is undesirable (each LED consumes
approximately 1 mA when turned on), jumper cap covering, JP5, may be removed. This
will effectively disconnect both LEDs from their respective I/O pins.
3.6PUSH BUTTONS
Two miniature push buttons are included on the PIM. Switch, S3 on the PIM, connects
to MCLR
stand-alone or while connected to the HPC Explorer board.
Pin, RB4 on the PIC18F87J50 microcontroller, is pulled up to V
resistor (R26 on the PIM). If push button, S4 on the PIM, is pressed, it will pull RB4 low.
This push button may be used for any general purpose user interfacing purposes.
When the PIM is plugged into the HPC Explorer board, the RB0 push button on the
HPC Explorer will also work and can be used for additional general purpose user input.
BUS line under any condition.
. It may be used to reset the microcontroller when the PIM is used either
DD through a 15 kOhm
BUS pin of the
3.7JUMPERS
The PIM has three jumper headers on it to provide additional flexibility for
experimentation and development purposes.
JP1 – This is a three-pin header with the labels, ‘I’, ‘R’ and ‘U’. The ‘R’ is an abbreviation
referring to microcontroller pin, RB5. ‘I’ is an abbreviation referring to the “ICE” female
header pin for the RB5 signal. ‘U’ is an abbreviation for the USB V
BUS line.
When the jumper is in the ‘R’ to ‘I’ position, the RB5 pin connects only to the ICE female
header pin, just like most of the other general purpose I/O pins. When the jumper is in
the ‘R’ to ‘U’ position, RB5 (which is 5.5V tolerant) can be used to sense when the USB
cable has been attached to the host, and when the host is actively providing power to
the +5V V
BUS line. According to the USB 2.0 specifications, no device should ever pull
the D+ or D- lines high (such as with the D+ or D- pull-up resistor) until the host actively
powers the +5V V
BUS line. This is intended to prevent self-powered peripherals from
ever sourcing even small amounts of power to the host when the host is not powered.
Small amounts of current could potentially prevent the host (and possibly other USB
peripherals connected to that host) from fully becoming depowered, which may cause
problems during power-up and initialization.
Self-powered peripherals should periodically monitor the +5V VBUS line and detect
when it is driven high. Only when it is powered should user firmware enable the USB
module and turn on the D+ (for full speed) or D- (for low speed) pull-up resistor, signaling device attach to the host. The recommended method of monitoring the +5V V
line is to connect it to one of the microcontroller’s 5.5V tolerant I/O pins through a large
value resistor (such as 100 kOhms). The resistor serves to improve the ESD ruggedness of the circuit as well as to prevent microcontroller damage if user firmware should
ever unintentionally configure the I/O pin as an output.
Peripherals which are purely bus powered obtain all of their power directly from the +5V
V
BUS line itself. For these types of devices, it is unnecessary to monitor when the VBUS
is powered, as the peripheral will not be able to source current on the D+, D- or V
lines when the host is not powered.
JP4 – This jumper is located in series with the +5V V
BUS power supply line from the
USB connector. When the jumper is removed, a current meter may be placed between
the header pins to measure the board current which is being drawn from the USB port.
Additionally, by removing the jumper cap altogether, JP4 provides a means of preventing the board from consuming USB power. See Section 3.4 “Linear Regulator/Power Management” for more details.
JP5 – This jumper provides a means of removing the LED pin loading on the RE0 and
RE1 pins.
BUS
BUS
3.8HARDWARE CONSIDERATIONS FOR COMPLIANCE TESTING
When developing USB applications that must pass the official USB compliance testing
process, it is recommended to select the USB cable and connector carefully. In order
to make a USB compliant application, the USB-IF requires that important USB building
blocks, such as cables and connectors, should also be individually compliant. For
example, if a standard USB B or mini-B connector is used on the application circuit
board, it should be capable of passing compliance tests specific for USB connectors.
USB building blocks which have officially gone through the compliance testing process
will have a Test ID (TID) number associated with them.
Microchip’s USB microcontrollers, such as the PIC18F87J50, have TID numbers
associated with them, and these numbers can be found at the USB design center:
http://www.microchip.com/usb (click on the “Full-Speed USB Solutions” link)
When developing products using standard USB cables and connectors, it is recommended to know the TID number for those components prior to including them in the
design.
To assist in the development of USB applications, Microchip provides a number of
demonstration firmware projects (such as HID, CDC, etc.), and other support materials,
such as application notes. The USB demonstration projects use the same basic USB
framework, which is referred to as the “MCHPFSUSB Firmware”. Documentation for
this firmware can be found in the “MCHPFSUSB Firmware User’s Guide” (DS51679).
The firmware projects are contained in an executable setup file which can be found
either on the CD-ROM disc, which distributes with the PIM, or at the Microchip USB
design center:
http://www.microchip.com/usb
Once the MCHPFSUSB Firmware has been installed, the MPLAB
ing the source code and hex file for the HID class, mouse like demonstration firmware,
that comes preprogrammed on the PIC18F87J50, can be found in the following
directory:
C:\MCHPFSUSB\fw\HID\Mouse
By default, the MPLAB IDE projects are configured to work with the PICDEM™ FS USB
Demo Board, which uses the PIC18F4550 microcontroller. Refer to the MCHPFSUSB
Firmware release notes for details on how to switch the projects over for use with the
PIC18F87J50.
Appendix A. PIC18F87J50 FS USB Plug-In Module Schematics
A.1SCHEMATICS
The PIC18F87J50 FS USB Plug-In Module schematics are shown in Figure A-1 and
Figure A-2. By default, the PIM ships from the factory with the PIC18F87J50
pre-installed in location U1. The PIC18F87J50 is the superset part in the device family,
and is therefore, a good starting point for developing USB applications that will
eventually use one of the other devices in the device family.
However, the pads of U1 have been designed to accommodate any of the products in
the PIC18F87J50 family of microcontrollers, both the 80-pin TQFP and 64-pin TQFP.
For example, if the PIC18F87J50 is carefully desoldered using hot air, and the pads are
cleaned using solder wick, it is possible to install the 64-pin TQFP PIC18F65J50 in its
place. This is possible since the pin pitch is the same between the 64-pin and 80-pin
TQFP packages, and the functionality is the same for pins which share the same locations between the two packages. Effectively, the 80-pin TQFP pads of U1 overlap with
the standard 64-pin TQFP pads.
The board revision number can be found etched into the copper on the bottom side of
the PCB underneath the programming header. The board revision number is the last
number in the line and is located inside the rectangular box.