PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide © 2009 Microchip Technology Inc.
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.
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 ................
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.
Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Initial caps Quotes Underlined, italic text with right angle bracket Bold characters N‘Rnnnn Text in angle brackets < > Courier New font: Plain Courier New Represents Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB® IDE User’s Guide ...is the only compiler...
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 Demonstration Board.
Preface THE MICROCHIP WEB SITE Microchip provides online support via the web site at www.microchip.com.
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.
Preface NOTES: © 2009 Microchip Technology Inc.
PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD USER’S GUIDE Chapter 1. Introduction 1.1 INTRODUCTION The PIC18F46J50 Full-Speed USB Demonstration Board is designed as an easy-to-use evaluation platform for Microchip’s full-speed, USB PIC18F46J50 family of microcontrollers. The board can be operated as a stand-alone device. Alternately, for additional demonstration functionality, the board can be used in conjunction with the PIC18 Explorer Board (www.microchipDIRECT.com) or PICDEM™ HPC Explorer Board (www.
All of the devices in the family are code compatible with each other and share these USB capabilities: • • • • • • USB 2.0 compliance Full-speed (12 Mbps) and low-speed (1.5 Mbps) operation Support of control, interrupt, bulk and isochronous transfers Support of up to 32 endpoints 3.
PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD USER’S GUIDE Chapter 2. Board Hardware The PIC18F46J50 Full-Speed USB Demonstration Board can be used as a stand-alone device or — for additional functionality — plugged into either the PIC18 Explorer Board (www.microchipDIRECT.com) or PICDEM HPC Explorer Board (www.microchipDIRECT.com). When used alone, the board contains all of the hardware necessary to make a USB compliant, full-speed peripheral device.
Board Hardware FIGURE 2-1: PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD 2 1 4 3 8 5 9 6 7 Full schematics of the PIC18F46J50 Full-Speed USB Demonstration Board are in Appendix B. “Board Schematics”. 2.1 POWER MANAGEMENT The USB interface provides +5V (nominal) power at up to 500 mA for use by USB peripheral devices. In order to take advantage of this bus provided power, a 3.3V, low dropout, low quiescent current linear regulator (TC1108-3.3VDB) has been included on the board.
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide In order to meet this USB suspend current requirement, a USB peripheral should be designed so that it does not place large quiescent loads directly on the +5V VBUS supply line from the USB port. If large loads will be supplied from the USB port, it is suggested that they be connected in a way that they can be turned off when the USB port is placed in the low-power suspend state.
Board Hardware The JP2 jumper allows the microcontroller firmware to monitor the USB_ATTACH signal when the jumper cap is in the position, R - U. The resistors, R15 and R17 of the schematics (see Appendix B. “Board Schematics”), serve multiple purposes. They level shift the +5V signal, provide a weak pull-down function on the VBUS line (to oppose any leakage that would interfere with measuring VBUS in the off/low state) and improve the ESD robustness of the circuit.
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide 2.6 OPERATION WITH THE PIC18 EXPLORER OR PICDEM™ HPC EXPLORER BOARDS The basic hardware capabilities of the PIC18F46J50 Full-Speed USB Demonstration Board can be supplemented by plugging it into the PIC18 Explorer Board or PICDEM HPC Explorer Board.
Board Hardware NOTES: © 2009 Microchip Technology Inc.
PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD USER’S GUIDE Chapter 3. Preprogrammed Firmware 3.1 OVERVIEW Microchip provides a wide variety of USB related example firmware projects, PC application projects, drivers, and other related resources for developing complete USB peripheral and host devices. These resources are included in the MCHPFSUSB Framework distribution package. The free package is on the CD-ROM disc that comes with the board.
Preprogrammed Firmware FIGURE 3-1: Note: © 2009 Microchip Technology Inc. WINDOWS® XP DEVICE MANAGER ENTRIES (DEMO MODE) Lines indicate the new entries that appear because the device has been attached to the PC.
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide 3.2 USING THE COMPOSITE HID+MSD CLASS DEMO FIRMWARE 3.2.1 MSD Interface The MSD (Mass Storage Device) interface displays the PIC18F46J50 Full-Speed USB Demonstration Board in My Computer as a new drive volume, similar to a USB “thumb drive” Flash memory device. Upon successful enumeration in Demo mode, the new drive volume will display Readme.txt, a writable text file stored in the microcontroller‘s Flash memory.
Preprogrammed Firmware FIGURE 3-2: HID DEMO APPLICATION The demo PC application provides a simple graphical user interface for sending and receiving small amounts of example data to and from the HID interface on the USB device. Full source code for both this PC application and the demo firmware are included in the MCHPFSUSB Framework.
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide FIGURE 3-3: USB HID BOOTLOADER APPLICATION – NO DEVICE 2. Plug the PIC18F46J50 Full-Speed USB Demonstration Board into a free USB port. 3. Place the board in the Bootloader mode by pressing and holding down the S2 push button (RB2 I/O pin). While still holding down the S2 push button, momentarily press and release the MCLR push button (S4) to reset the device, keeping the S2 button depressed until after the device has come out of Reset.
Preprogrammed Firmware MPLAB IDE can be used to create these firmware image files by: 1. Building a firmware project and using a modified linker script necessary for the bootloader. 2. Selecting File>Export and specifying the file format, INHX32. By default, the precompiled demo .hex files included in the MCHPFSUSB Framework distribution can be programmed using the USB bootloader application.
PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD USER’S GUIDE Appendix A. Troubleshooting Tips This appendix gives solutions for common issues. Problem 1: The USB device enumerates correctly in Demo mode (and appears normal in the Device Manager), but a new drive volume does not appear for the MSD interface. Resolution: See if the target system has a drive letter conflict.
Problem 3: When a PC application, such as the HID bootloader and HID PnP Demo Composite HID+MSD Demo only (PID=0x0054).exe are launched, an error message appears and the application does not open correctly. Resolution: The HID bootloader and HID PnP demo applications were developed in the Microsoft Visual C++ 2005 Express Edition development environment and will not run without the PC having the .NET Framework 2.0 (or higher) redistributable package installed. If the .
PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD USER’S GUIDE Appendix B. Board Schematics Figure B-1 through Figure B-3 show the schematics for the PIC18F46J50 Full-Speed USB Demonstration Board. When designing the PIC18F46J50 Full-Speed USB Demonstration Board, special care was taken to make the board USB 2.0, full-speed compliant. It is suggested that those designing new USB applications review section 7.2 of the official USB 2.0 specifications.
Board Schematics PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD – PINS(1,2,3) FIGURE B-1: 1 F 0.1 56 k7 2.2 1 F F_Tant F 100 k 15 k7 2 k7 0.1 8207 PICkit™ 2 Style Programming Header F 07 07 15 k7 2 k7 07 1.5 k7 07 Note 1: 2: 3: 1.5 k7 In order to be USB compliant, a USB device that is not purely bus-powered (such as containing a battery or having a wall cube) should monitor the +5 VBUS pin from the USB connector.
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide FIGURE B-2: PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD – MICROPROCESSOR(1,2) 0 0.1 F 12 MHz 22 pF 22 pF PIC18F46J50 0.1 F 0.1 F 330 10 F Note 1: 2: 0.1 F Components R10 and D3 are not required in production. They are included here in case the user accidentally tries to communicate with the device while a high-voltage ICSP entry device is selected in MPLAB® IDE.
Board Schematics FIGURE B-3: PIC18F46J50 FULL-SPEED USB DEMONSTRATION BOARD – ICE MODULE(1,2) 1.18 k7 1% Note 1: 2: Components, R3 and J1, are used to “program” the adjustable linear regulator output voltage to 3.3V when the PIC18F46J50 Full-Speed USB Demonstration Board is plugged into either the PIC18 Explorer Board or the PICDEM™ HPC Explorer Board. The ICE module consists of the female header pins on the bottom of the board.
PIC18F46J50 Full-Speed USB Demonstration Board User’s Guide NOTES: DS51806A-page 27 © 2009 Microchip Technology Inc.
WORLDWIDE SALES AND SERVICE AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.