Microchip Technology PIC18F46J50 User Manual

PIC18F46J50 Full-Speed USB
Demonstration Board
User’s Guide
© 2009 Microchip Technology Inc. DS51806A
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 t he lik e is provided only for your convenience and may be su perseded by upda t es . It is y our 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 supp ort and/or safety ap plications is entir ely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless M icrochip from any and all dama ges, claims, suits, or expenses re sulting from such use. No licens es 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, MPLAB, PIC, PICmicro,
PICSTART, rfPIC, SmartShunt and UNI/O are registered trademarks of Microchip Tec hnology Incorporated in the U.S.A. and other countries.
FilterLab, Linear Active Thermistor, 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, In-Circuit Serial Programmin g , IC SP, ICE P I C , M in d i , MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, nanoWatt XLP, PICkit, PICDEM, PICDEM.net, PICtail , PIC
32
logo, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, WiperLock and ZENA are trademarks of Microchip Tec hnology 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.
© 2009, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
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.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
DS51806A-page ii © 2009 Microchip Technology Inc.
PIC18F46J50 FULL-SPEED USB
DEMONSTRATION BOARD
USER’S GUIDE

Table of Contents

Preface ........................................................................................................................... 1
Chapter 1. Introduction
1.1 Introduction .....................................................................................................7
1.2 Demonstration Board Package Contents ....................................................... 7
1.3 PIC18F46J50 Family USB Capabilities ..........................................................7
Chapter 2. Board Hardware
2.1 Power Man age ment ...................................... .. .. ...........................................10
2.2 LEDs ............................................................................................................. 11
2.3 Push Button s ..... .. .. ..................................................... ... .. ............................. 11
2.4 Jumpers ........... .. ........................................................................................... 11
2.5 Programming the Microcontroller ................................................................. 12
2.6 Operation with the PIC18 Explorer or PICDEM™ HPC Explorer Boards ..... 13
Chapter 3. Preprogrammed Firmware
3.1 Overview ............. ......................................................................................... 15
3.2 Using the Co mp o s ite H ID + M S D Cl ass Demo Firmwa re .......... .................... 1 7
3.3 Using the HID Bootloader Firmware .............................................................18
Appendix A. Troubleshooting Tips ...........................................................................21
Appendix B. Board Schematics .................................................................................23
Worldwide Sales and Service ....................................................................................28
© 2009 Microchip Technology Inc. DS51806A-page iii
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide
NOTES:
DS51806A-page iv © 2009 Microchip Technology Inc.
PIC18F46J50 FULL-SPEED USB
DEMONSTRATION BOARD
USER’S GUIDE

Preface

NOTICE TO CUSTOMERS
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 p age 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 online help files.
®
IDE online help.

INTRODUCTION

This chapter contains general information that will be useful to know before using the PIC18F46J50 Full-Speed USB Demonstration Board. Items in this chapter include:
• D ocum ent Lay out
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Doc um ent Rev isio n History

DOCUMENT LAYOUT

This document describes how to use the PIC18F46J50 Full-Speed USB Demonstration Board as a development tool to emulate and debug firmware on a target board. The manual layout is as follows:
Chapter 1. “Introduction” – The board package’s contents and the USB capabilities of the PIC18F46J50 family of devices
Ch apt er 2. “Board Hardware” – The board’s hardware elements and additional capabilities available by connecting the board to a PIC18 Explorer Board or PICDEM™ HPC Explorer Board
Chapter 3. “Preprogrammed Firmware” – The board’s preloaded demonstra­tions, and other demonstrations and projects available in the MCHPFSUSB Framework
Appendix A. “Troubleshooting Tips” – Solutions for common issues
Appendix B. “Board Schematics” – Schematic diagrams
© 2009 Microchip Technology Inc. DS51806A-page 1

CONVENTIONS USED IN THIS GUIDE

This manual uses the following docum entat io n conven tion s:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic chara c ters Referenced books MPLAB
Initial caps A window the Output window
Quotes A field name in a window or
Underlined, italic text with right angle bracket
Bold characters A dialog-box button Click OK
N‘Rnnnn A number in verilog format,
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Italic Courier New A variable argument file.o, where file can be
Square brackets [ ] Optional arguments mcc18 [options] file
Curly brackets and pipe character: { | }
Ellipses... Replaces r epeated text var_name [,
Preface
®
IDE User’s Guide
Emphasized text ...is the only compiler...
A dialog the Settings dialog A menu selection select Enable Programmer
“Save project before build”
dialog A menu path File>Save
A tab Click the Power tab
4‘b0010, 2‘hF1 where N is the tota l number of digits, R is th e radi x and n is a digit.
Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’
any valid filename
[options]
Choice of mut ually exclus ive arguments; an OR selection
Represents code supplied by user
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
© 2009 Microchip Technology Inc. DS51806A-page 2
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide

WARRANTY REGISTRATION

Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates.
Interim software releases are available at the Microchip web site.

RECOMMENDED READING

This user’s guide describes how to use the PIC18F46J50 Full-Speed USB Demonstra­tion Board. The following Microchip documents are recommended as supplemental references:
“PIC18F46J50 Family Data Sheet” (DS39931)
• MCHPFSUSB Framework’s release notes and other documentation Microchip provides a variety of USB related application notes, firmware, drivers, PC
application source code and other resources to assist application developers. Many of the USB related firmware files, and PC application source code projects and documen­tation are in the earlier referenced MCHPFSUSB Framework on the CD-ROM disc that comes with the board. The latest version of this package and the other resources can be downloaded at the Microchip USB design center:
http://www.microchip.com/usb/
Schematics and other support materials for the PIC18 Explorer Demonstration Board can be obtained at:
http://www.microchip.com/pic18explorer
Schematics and other support materials for the HPC Explorer Demonstration Board can be obtained at:
http://www.microchip.com/HPCExplorer
The official USB 2.0 specifications also could be helpful. These materials can be obtained from the USB Implementer’s Forum:
http://www.usb.org
Chapters 5, 8 and 9 of the USB 2.0 specifications are particularly important for applica­tion developers making USB peripheral devices. These chapters discuss important USB protocol fundamentals and the necessary device requests that must be supported to enable successful USB enume ra tio n.
If considering use of the PIC18F46J50 Full-Speed USB Demonstration Board with one of the boards discussed in Chapter 2. “Board Hardware”, the following Microchip documents are recommended:
PICDEM™ PIC18 Explorer Demonstration Board User’s Guide (DS51721)
PICDEM™ HPC Explorer Board Info Sheet (DS51540)
DS51806A-page 3 © 2009 Microchip Technology Inc.
Preface

THE MICROCHIP WEB SITE

Microchip provides online support via the web site at www.microchip.com. The site makes files and information easily available to customers, including the following:
Product Support – Data sheets and errata, application notes, sample programs, design resources, user’s guides, hardware support documents, and the latest software releases and archiv ed softwar e
General Technical Support – Frequently Asked Questions (FAQs), links for tech­nical support requests and online discussion groups, and a listing of the Microchip consultant program’s members
Business of Microchip – Product selector and ordering guides, the latest Microchip press releases, and listings of seminars, events, and 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 receive email notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool.
To register, access the Microchip web site at www.microchip.com 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.
The tools include the MPLAB MPLAB ASM30 assemblers, MPLINK™ and MPLAB LINK30 object linkers, and MPLIB™ and MPLAB LIB30 object libraries.
Emulators – The latest information on Microchip in-circuit emulators. Among the emulators are the REAL ICE™ 2000 and REAL ICE 4000.
In-Circuit Debuggers – The latest information on the Microchip in-circuit debuggers: PICkit™ 2, MPLAB ICD 2, MPLAB ICD 3 and REAL ICE.
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. The programmers include the MPLAB PM3 and PRO MATE II device
programmers and the PICSTART programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
®
C18 and MPLAB C30 C compilers, MPASM™ and
®
Plus and PICkit™ 1 development
, click on Customer
© 2009 Microchip Technology Inc. DS51806A-page 4
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide

CUSTOMER SUPPORT

Assistance for Microchip customers is available through:
• Distributors or representatives
• Local sales offices
• Field Application Engineers (FAEs)
• Technical support resources Customers should contact their distributor, representative or Field Application Engineer
(FAE) for support. Local sales offices are also available to help customers. A list of sales and service offices is on the back of this document.
Technical support is available through the web site at: http://support.microchip.com

DOCUMENT REVISION HISTORY

Revision A (March 2009)
• Initial release of this document.
DS51806A-page 5 © 2009 Microchip Technology Inc.
NOTES:
Preface
© 2009 Microchip Technology Inc. DS51806A-page 6
Loading...
+ 23 hidden pages