Home
PIC32MX USB Starter Board User's Guide
Contents
1. FIGURE A 6 PIC32MX SCHEMATIC SHEET 6 OF 6 POWER SUPPLY P32_VBUS 5V_DUSB CPU_ ON POWE D7 D2 R17 DNP 100K Q1 TR LI 3 3V 4 71H Es P32 VDD N M 5V_EXT H hn son P10 2 oND S SHON Vout FDN3 6P D3 C8 GREEN MCP1603 SOT23 5 4 7uF EA R19 4 7uF 330 tOGND1 USB OTG Device Power Supply 120 mA MAX P32 VOD R24 DNP U4 mn 8 SELECT PGoop 1 P32 VDD J5 VBUSON C11N AN5 CN7 RB5 7 SHON Vout 2 H P32_VBUS I VBUS Bien DO D RG3 D C17 d je AF Ze Sea R27 D RG2 D DEVICE OTG PORT TYPE MICRO A B wl MCP1253 MSOP CI8 C25 100K usBID RFS 5 4 7uF 6 8uF f Shield 6 USB HOST Power Supply xInstall Jumper if powering from Debuger Power Supply U6 J4 JP2 1 5V DUSB c gt c 5V_EXT IN OUT GND D RG3 2 VBUSON C1IN AN5 CN7 RB5 tN TE CN20 UTCTS RDI4 CoG D R62 POST PORT TYPE A TPS20X1B 100uF A il A 3 3V 3 3V EEN EEN EEN 3 3v P32 VoD P32 voo P32 vop Pp32 voo P32_vop P32 von deg doca leet eine les NY E OR OE CS EE TUF luF luF uF 1uF uF TuF TUF TUF Jup Jup Jup Leen DS61150B page 34 2008 Microchip Technology Inc MICROCHIP PIC32MX USB STARTER BOARD USER S GUIDE Index A P Active Toolsuite 17 PIC32MX B Layout 32 bit microcontroller 6 Building the tutorial project 10 C
2. 25 Tale reld ei oi AE EE EE EE ides 25 elek ENEE 25 IntrodUGUON Ede m a te E au umata be Ee ee ee E 29 Development Board Block Diagram us 29 Starter Board Schematics siens 29 Il LC RR SERRE ER RS a 35 Worldwide Sales and Service u 36 2008 Microchip Technology Inc DS61150B page iii PIC32MX USB Starter Board User s Guide NOTES DS61150B page iv 2008 Microchip Technology Inc PIC32MX USB STARTER MICROCHIP 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 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 IDE online help Select the Help menu and then Topics to open a list of available online help files INTRODUCTION This chapter contains general information that will be useful to know before using the
3. page 23 Task 8 Run the Program page 24 2008 Microchip Technology Inc DS61150B page 15 PIC32MX USB Starter Board User s Guide 3 3 1 Task 1 Select a Device Start MPLAB IDE Click File gt Close Workspace on the menu bar to close any open workspace Click Project gt Project Wizard to start the wizard In the Welcome window click Next The Project Wizard Step One window is displayed as shown in Figure 3 1 ONS FIGURE 3 1 SELECTING THE DEVICE Project Wizard Step One Select a device Device PIC32M gt lt 460F51 2L lt Back Cancel Help 5 From the Device drop down list select PIC32MX460F512L 6 Click Next The Project Wizard Step Two dialog box opens see Figure 3 2 DS61150B page 16 2008 Microchip Technology Inc Create a New Project FIGURE 3 2 SELECTING THE TOOLSUITE Project Wizard Step Two Select a language toolsuite Active Toolsuite Microchip PIC32 C Compiler Toolsuite i Toolsuite Contents MPLAB 4SM32 Assembler pic32 as exe MPLAB C32 C Compiler pic32 gcc exe MPLAB LINK 32 Object Linker pic32 Id exe MPI R 11839 Ohiect ihrarian drehiver ni 37 21 evel Location C Program Files Microchip MPLAB C32 bin pic32 as exe Help My Suite Isn t Listed C Show all installed toolsuites 3 3 2 Task 2 Select the Language Toolsuite 1 From the Active Toolsuite drop down list click Micr
4. Output Build Version Control Find in Files MPLAB PIC32MX Debugger Starter Kit Found PIC32MX Starter PIC32MX460F512L pe Oxbfc00000 Ln 1 Col1 INS WR 2008 Microchip Technology Inc DS61150B page 9 PIC32MX USB Starter Board User s Guide 2 7 BUILDING THE PROJECT From the menu bar of the main MPLAB IDE window click Project gt Make The build Output window displays as shown in Figure 2 2 Observe the progress of the build When the BUILD SUCCEEDED message displays you are ready to program the device FIGURE 2 2 BUILD OUTPUT WINDOW 2i Output Buld Version Control Find in Files MPLAB PIC32MX 2MXSK 1 Maps Objects usb hid mouse device demo starter board pic32mk460f512Musb hid mouse device de 2 Executing CAProgram Files Microchip MPLAB C32 bin pic32 bin2hex exe CApic32 solutionstusb hid mouse device Loaded CApic32_solutions usb_hid_mouse_device_demo Objects usb d mouse device demo starter board pic Debug build of project CApic32 solutionstusb hid mouse device demotusb hid mouse device demo starter boan Preprocessor symbol DEBUG is defined Target debug platform is MPLAB DEBUGGER PIC32MXSK 1 Mon Apr 07 16 25 22 2008 BUILD SUCCEEDED 3 EEE Ee DS61150B page 10 2008 Microchip Technology Inc PIC32MX USB Starter Board Tutorial 2 8 PROGRAMMING THE DEVICE 2 8 1 Program the Device Cli
5. DOCUMENTATION CONVENTIONS Description Represents Examples Arial font Italic characters Referenced books MPLAB IDE User s Guide Emphasized text iS the only compiler Initial caps A window the Output window A dialog the Settings dialog A menu selection select Enable Programmer Quotes A field name in a window or dialog Save project before build Underlined italic text with right A menu path File gt Save angle bracket Bold characters A dialog button Click OK A tab Click the Power tab Text in angle brackets lt gt A key on the keyboard Press lt Enter gt lt F1 gt Courier New font Plain Courier New Sample source code define START Filenames autoexec bat File paths c mcci8 h Keywords aam endasm static Command line options Opat Opa Bit values 0 1 Constants in source code OxFF A Italic Courier New A variable argument file o where file can be any valid filename Square brackets Optional arguments mcc18 options file options Curly brackets and pipe Choice of mutually exclusive errorlevel 0 1 character arguments an OR selection Ellipses Replaces repeated text var_name var_name Represents code supplied by user void main void DS61150B page 2 2008 Microchip Technology Inc Preface RECOMMENDED R
6. CN Header Files Add Files CN Object Files Filter CN Library Files C Linker Scripts E Other Files J Files oy Symbols 7 Click Debugger gt Select Tool gt PIC32MX Starter Kit from the menu bar for the Target board Note Make sure that the starter board is connected to your PC DS61150B page 20 2008 Microchip Technology Inc Create a New Project 3 3 5 Task 5 Confirm the Configuration Settings Click Configure gt Configuration Bits to confirm that the configuration settings are correct Typical configuration settings for the starter board are shown in Figure 3 6 Note The configuration settings can also be embedded in the source file See the MPLAB C32 C Compiler User s Guide DS51686 for information FIGURE 3 6 CONFIGURATION BIT SETTINGS E Configuration Bits Configuration Bits set in code 1FCO 2FFC ICE ICD Comm Channel Select ICE EMUCZ EMUD2 pins shared with PGC2 PGD2 Boot Flash Write Protect Boot Flash is writable Code Protect Protection Disabled 1FCO_2FF8 00005243 Oscillator Selection Bits Primary Osc w PLL XT H5 EC PLL Secondary Oscillator Enable Disabled Internal External Switch Over Disabled Primary Oscillator Configuration HS osc mode CLKO Output Signal Active on the OSCO Pin Disabled Peripheral Clock Divisor Pb Clk is Sys_Clk 1 Clock Switching and Monitor Selection Clock switching disabled fail safe clock monitor disabled Watchdog Timer Postscaler 1 1
7. MICROCHIP PIC32MX USB Starter Board User s Guide 2008 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 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
8. A Microchip USB hid_device_driver hid c A Microchip USB usb_device c A Microchip USB usb_hal c A Microchip USBiusb_hal_core c Microchip include usbihiddesc h Microchip Include usb hidreport h 2 Microchip Include usb usb h Microchip include usb usb_ch9 h Microchip Includelusbiusb_common h Microchip Include usb usb_device h Microchip include usb usb_device_hid h AMicrochip include usb usb_hal h MicrochipiUSB hid_device_driver hidpri h 5 HardwareProfile h 8887 be ZJoepbo ORE ADAARGROGR K p n pp amp B EB USB Human Interface Device HID Function Driver This file implements the USB device abstraction Filename hid c Dependancies TED Processor TBD Hardware TBD Assembler TED Linker TBD Company Microchip Technology Inc Software License Agreement The software supplied herewith by Microchip Technology Incorporated the Company for its PICmicro Microcontroller is intended and supplied to you the Company s customer for use solely and exclusively on Microchip PICmicro Microcontroller products The software is owned by the Company and or its supplier and is protected under applicable copyright laws All rights are reserved Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws as well as to civil liability for the breach of the terms and conditions of this license s
9. Watchdog Timer Enable WDT Disabled SWDTEN Bit Controls 1FCO_2FF4 00000101 PLL Input Divider 2x Divider PLL Multiplier 15x Multiplier USB PLL Input Divider 2x Divider USB PLL Enable Enabled System PLL Output Clock Divider PLL Divide by 1 Note The Configuration Bits set in code check box must be unchecked if the config bits are set via this window and not in the code 2008 Microchip Technology Inc DS61150B page 21 PIC32MX USB Starter Board User s Guide 3 3 6 Task 6 Build the Project 1 Click Project gt Make from the menu bar of the main MPLAB IDE window The build Output window displays Figure 3 7 2 Observe the progress of the build When the BUILD SUCCEEDED message displays you are ready to program the device FIGURE 3 7 BUILD OUTPUT WINDOW Build Version Control Find in Files MPLAB PIC32MX Clean Deleting intermediary and output files Clean Deleted file CAMyProjecAblinkLED o Clean Deleted file C MyProject BlinkLED elf Clean Deleted file C MyProject BlinkLED hex Clean Deleted file C MyProject BlinkKLED mcs Clean Done Executing C Program Files Microchip MPLAB C32 bin pic Executing C Program Files Microchip MPLAB C32 bin pic Executing C Program Files Microchip MPLAB C32 bin pic Loaded CAMyProject BlinkLED elf BUILD SUCCEEDED Fri Sep 28 15 39 24 2007 lt w FsIcrc r iss Yr ras DS61150B page 22 2008 Microchi
10. 12 USB Type Micro AB receptacle for OTG and USB Device connectivity for PIC32MX OTG Device based Applications on the underside on board 13 USB Host and OTG power supply for powering PIC32MX USB applications se 00NOO DB Note 1 To power Rev B boards the USB debug cable must be connected to a USB port on the host PC 2 When running USB device applications open the jumper JP2 to prevent possibly back feeding voltage onto VBUS from one port on the host to another or from one host to another FIGURE 1 1 PIC32MX USB STARTER BOARD LAYOUT Ki We MICROCHIP E www microchip c n PIC32 NC14 SI S COO om SW st Ow RD6 LED Sm R9 c12R PIC32 Pwr B TP10 eg un PS S RD13 LEDS RD2 SW3 lt a ee 3 Gs ezn 6 AU IL PIC USB STARTER BOARD e je DS61150B page 6 2008 Microchip Technology Inc PIC32MX USB STARTER MICROCHIP BOARD USER S GUIDE Chapter 2 PIC32MX USB Starter Board Tutorial 2 1 INTRODUCTION This chapter is a self paced tutorial to get you started using the PIC32MX USB Starter Board 2 2 HIGHLIGHTS Items discussed in this chapter include Host Computer Requirements Installing the PIC32MX USB Starter Board Software Using the PIC32MX USB Starter Board Out of the Box Starting the Tutorial Project Building the Project Programming the Device Running the Program Tutorial Program Operation 2 3 HOST COMPUTER R
11. Processor Support 25 Block Diagramme rase 29 Le UE 26 USB Connectivity ee ee 25 T Host Computer Requirements ee 7 Tutorial Program Operation DS EK E 12 Tutorial Project Program operation 12 Internet Address 3 Programming the device u 11 L Slartig EE A a OE N 9 Language Toolsuite e mail 17 U Last Schematic 34 USB M Connectivity sia ant cere eae heals 25 Microchip Internet Web Site 3 W MPLAB IDE Simulator Editor Users Guide 3 WWW Address 3 2008 Microchip Technology Inc DS61150B page 35 MICROCHIP WORLDWIDE SALES AND SERVICE AMERICAS 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 com Atlanta Duluth GA Tel 678 957 9614 Fax 678 957 1455 Boston Westborough MA Tel 774 760 0087 Fax 774 760 0088 Chicago Itasca IL Tel 630 285 0071 Fax 630 285 0075 Dallas Addison TX Tel 972 818 7423 Fax 972 818 2924 Detroit Farmington Hills MI Tel 248 538 2250 Fax 248 538 2260 Kokomo Kokomo IN Tel 765 864 8360 Fax 765 864 8387 Los Angeles Mission Viejo CA Tel 949 462 9523 Fax 949 462 9608 Santa Clara Santa Clara CA Tel 408 961 6444 Fax 408 961 6445 Toronto Mississauga Ontario Canada Tel 905 673 0699 Fax 90
12. device by emulating a mouse Depending on the revision of your USB starter board make the following connections to run the mouse demo For Rev B of the USB starter board the host PC must have two available USB ports 1 Move jumper JP2 to the open position 2 Use the USB debug cable Mini B to A to attach the board s debug connector J1 to the first USB port of the host PC Rev B boards source power from the debugger connection 3 Use the USB Micro B to full sized A cable to attach the board s J5 connector type Micro AB receptacle to the second USB port of the host PC For a later revision of the USB starter board 1 Move jumper JP2 to the open position 2 Use the USB Micro B to full sized A USB cable to attach the board s J5 connector type Micro AB receptacle to an available USB port on the host PC Note For the HID mouse demo and all other USB device demos the JP2 jumper should be open to prevent the possibility of back feeding voltage onto VBus from one port on the host to another or from one host to another After a pause the PIC32MX USB Starter Board will enumerate as a standard mouse HID using drivers built into the host s operating system The successful completion of this process is usually accompanied by a bing bong tone from the host PC The output window will display a message indicating that the demo is running as shown in Figure 2 7 DS61150B page 12 2008 Microchip Technology In
13. 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 QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV ISO TS 16949 2002 Trademarks The Microchip name and logo the Microchip logo Accuron dsPIC KEELOQ KEELOQ logo MPLAB PIC PICmicro PICSTART PIC SmartShunt and UNI O are registered trademarks of Microchip Technology 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
14. 13 PMPA10 AN13 RB13 187 128 U2CTS RF12 WARTS PMPA9 U2RX CN17 RF4 M 1e PMPA9 U2RX CN17 RF4 PMPAB U2TX CN1B RFS in 112 PMPAB U2TX CN1B RFS PMPA7 VREF RAQ us 114 PMPA7 VREF RAQ_ AD REE PMPAG VREF RA1Q ES 116 PMPAG VREF RA10 PMP ADDRESS PMPA5 SCK2 CN8 RG6 gt uz ng TDO RAS PMPA4 SDI2 CN9 RG7 ug 120 TDI RA4 FAG GPIO PMPA3 SDO2 CN10 RG8 123 124 TCK RA1 PMPA2 SS2 CN11 RG9 128 126 TMS RAQ PMPA1 AN14 RB14 ie 128 PIC32 PGC2 PMPAQ AN15 0CFB CN12 129 138 PIC32 MEIER CSP ot 132 PIC32 PGD2 11 GND 12 33 P33 34 4 55 GND 56 4 4 77 GND 78 4 i 99 Loun 100 Hay H22 4 DS61150B page 32 2008 Microchip Technology Inc PIC32MX USB Starter Board Schematics FIGURE A 5 PIC32MX SCHEMATIC SHEET 5 OF 6 SWITCHES AND LEDS OER Tee USER SWITCH S Si 330 R29 z D4 SE AAA SDO1 INTO O0C1 RDO PMPD14 CN15 RD6 O 0 RED 330 R22 DS DE e AAA OC2 RD1 PMPD15 CN16 RD7 O O YELLOW 330 R23 06 dE AA OC3 RD2 CN19 PMPD13 RD13 gt _O O GREEN 2008 Microchip Technology Inc DS61150B page 33 PIC32MX USB Starter Board User s Guide So
15. 2 RA3 C6 SCL2 RA2 35 36 Les 37 wen 38 PIC32 PGD2 DBG SDO R13 4 7K 26 27 28 29 C10UT AN8 RB8 S C1OUT ANB RBB 33 34 C2OUT AN9 RB9 PMPA13 CVREF AN10 PMPA7 VREF RA9 PMPA6 VREF RA10 PMPA12 AN11 RB11 TCK RA U2RTS BCLK2 RF13 d ed e lt el P32 VDD 39 40 U2CTS RF12 PMPA11 AN12 RB12 42 PMPATO AN13 RBI3 43 pypat AN14 RB14 44 47 CN20 UTGTS RD14 45 Les VOD 46 48 oc 41 49 50 PMPA1 AN14 RB1 4 PMPAQ AN15 0CFB CN12 CN2 U1CTS RD14 CN21 U1RTS BCLK PMPA10 AN13 RB13 PMPA9 U2RX CN17 RF4 PMPAB U2TX CN18 RF5 D ed Mm lt Si D RG3 P32 VBUS UITX RF8 UIRX RF2 USBID RF 3 11pF iN 11pF iy 20pF Y2 TF D RG2 20pF in pin Joen pseog ILIS GSN XINZEDId ou ABojouyoe doo 800Z Le oBed gogL L9sg FIGURE A 3 PIC32MX SCHEMATIC SHEET 2 OF 6 PIC18LF4550 DEBUG CPU 5V DUSB P18 SPP DAT2 P18 SPP DAT P18 SPP DATO LINK ACTIVE D1 ke P18_SPP_DAT3 FPGA_ SLEEP USB INTERFACE PIC32_ MEIS YELLOW 3 3V 39 RD1 SPP1 38 RDO SPPO C3 RD4 SPP4 OSCH 20pF RD5 SPP5 VSS vi RD6 SPP6 U1 VSS Ha RD7 SP VDD T 8Mhz ree PICI8F455Q_QFN44 D Ch VDD RE2 OESPP P18_SPP_0E J VDD RE1 CK2SPP Z2 Pi8s_SPP_DSTROBE 20pF P
16. 5 673 6509 ASIA PACIFIC Asia Pacific Office Suites 3707 14 37th Floor Tower 6 The Gateway Harbour City Kowloon Hong Kong Tel 852 2401 1200 Fax 852 2401 3431 Australia Sydney Tel 61 2 9868 6733 Fax 61 2 9868 6755 China Beijing Tel 86 10 8528 2100 Fax 86 10 8528 2104 China Chengdu Tel 86 28 8665 5511 Fax 86 28 8665 7889 China Hong Kong SAR Tel 852 2401 1200 Fax 852 2401 3431 China Nanjing Tel 86 25 8473 2460 Fax 86 25 8473 2470 China Qingdao Tel 86 532 8502 7355 Fax 86 532 8502 7205 China Shanghai Tel 86 21 5407 5533 Fax 86 21 5407 5066 China Shenyang Tel 86 24 2334 2829 Fax 86 24 2334 2393 China Shenzhen Tel 86 755 8203 2660 Fax 86 755 8203 1760 China Wuhan Tel 86 27 5980 5300 Fax 86 27 5980 5118 China Xiamen Tel 86 592 2388138 Fax 86 592 2388130 China Xian Tel 86 29 8833 7252 Fax 86 29 8833 7256 China Zhuhai Tel 86 756 3210040 Fax 86 756 3210049 ASIA PACIFIC India Bangalore Tel 91 80 4182 8400 Fax 91 80 4182 8422 India New Delhi Tel 91 11 4160 8631 Fax 91 11 4160 8632 India Pune Tel 91 20 2566 1512 Fax 91 20 2566 1513 Japan Yokohama Tel 81 45 471 6166 FDS61150Bax 81 45 471 6122 Korea Daegu Tel 82 53 744 4301 Fax 82 53 744 4302 Korea Seoul Tel 82 2 554 7200 Fax 82 2 558 5932 or 82 2 558 5934 Malaysia Kuala Lumpur Tel 60 3 6201 9857 Fax 60 3 6201 9859 Malaysia Penang T
17. AS SCK2 CNB RGS PMPA4 SDI2 CN9 RG7 PMPA3 SDO2 CN10 RGB MCLR PMPA2 SS2 CN11 RG9 VSS VDD HMS RAQ INT1 REB INT2 RE9 IVBUSON CTIN ANS RBS USBOEN C1IN AN4 RB4 C2IN AN3 CNS RBS C2IN ANZ QN4 REZ POCI ANI S RB1 2 PCD 1 ANo G2 BO SA PMPA7 VREF 1 PMPA6 VREF RA10 C2OUT AN9 R89 PMPA13 CVREF AN10 PGC2 AN6 TRCLK RA6 PMPA12 AN11 RB11 so 89 PMPD10 RF1 88 pMPD10 RF1 PMPD8 RGQ PMPD9 RG1 U2 ITCK RA1 PMPD11 RFQ UZRTS BCLK2 RF13 PIC32MX4XXFXXXLUSB_ TQFP10 U2CTS RF12 OC4 RD3 OC3 RD2 OC2 RD1 VCAP VDDCORE vss PMPRD CN14 RD5 SOSCO TICK CNO RC14 PMPDI5 CN16 RD7 84 PMPD14 CN15 RD6 PMPWR OC5 C13 RD4 CN19 PMPD13 RD13 1C5 PMPD12 RD12 sosc1 CN1 RC13 D01 INT 0C1 RDQ 1C4 PMPCS1 RD11 SCK1 IC3 PMPCS2 RD10 SS1 1C2 RD9 IC1 RTCC RDB INT4 SDA1 RA15 INT3 SCL1 RA14 vss OSC2 CLKO RC15 OSC1 CLKI RC12 VDD TDO RAS TDI RA4 SDA2 RAS SCL2 RA2 D RG2 D RG3 HIE veus UITX RFB UIRX RF2 USBID RF3 PMPA AN15 OCFB CN12 UTRTS BCLK PMPA9 U2RX CN17 RF4 PMPAB U2TX CN18 RF5 PMPA11 AN12 RB12 P32 VDD l C15 SOSCO T1CK CN RC14 D SOSC1 CN1 RC13 SDO1 INT 0C1 RDO J Y3 IC4 PMPCS1 RD11 32kHz SCK1 IC3 PMPCS2 RD 10 C16 SS1 IC2 RDS IC1 RTCC RDB A INT4 SDA1 RA15 INT3 SCL1 RA14 Jj C5 a TDO RAS TDI RA4 8Mhz SDA
18. D14 CN15 RD6 PMPRD CN14 RD5 25 7 26 PMPD15 CN16 RD7 PMP CONTROL ic4 PMPCS1 RD11 z L PMPWR OC5 C13 RD4 SCK1 IC3 PMPCS2 RD10 2 30 SOSC1 CN1 RC13 SECONDARY OSC SOSCO T1CK CN RC14 2 32 SOSCO T1CK CN RC14 T2CLK RC1 35 cb PMPAB AN15 0CFB CN12 5 TIMERS TSCLK RC2 3 PMPWR OC5 C13 RD4 TACLK RCS 39 22 OC4 RD3 SDI1 T5CLK RC4 s a2 OC3 RD2 5 0c PWM 4 OC2 RD1 PMPA5 SCK2 CN8 RG6 48 45 SDO1 INT 0C1 RDO PMPA4 SDI2 CN9 RG7 48 IC5 PMPD12 RD12 spi2 PMPA3 SDO2 CN10 RG8 2 52 IC4 PMPCS1 RD11 PMPA2 S52 CN1 1 RG9 51 52 SCK1 IC3 PMPCS2 RD1 5 INPUT CAPTURE 3 SS1 1C2 RD9 58 IC1 RTCC RDB DEBUG SMBUS DBG_ SMSDA SS DBE SMSCL s 82 VBUSON C1IN AN5 CN7 RB5_ VBUSON C1IN AN5 CN7 RB5 8 sa USBOEN C1IN AN4 CN6 RB4 COMPARATOR 1 USBOEN C1IN AN4 CN6 RB4 65 ss C2IN AN3 CN5 RB3 en A D C2IN AN3 CN5 RB3 E M C2IN AN2 CN4 RB2 COMPARATOR Z C2IN AN2 CN4 RB2 se 72 PGC1 AN1 CN3 RB1 C10UT AN8 RB8 PGD1 AN CN2 RBQ C2OUT AN9 RB9 73 74 SDA2 RA3 75 76 SCL2 RA2 gt DCH INT4 SDA1 RA15 z s INT3 SCL1 RA14 81 82 4 5 EXT_INT INT2 RE9 M 84 INT3 SCL1 RA14 INTI RES 85 B6 INT4 SDA1 RA15 C SDO1 INT 0C1 RDO 87 U1RX RF2 D 90 U1TX RF8 SCK1 IC3 PMPCS2 RD10 21 92 CN21 UTRTS BCLK VARTI Sai SDI1 TSCLK RC4 93 94 CN20 U1CTS RD14 SDO1 INT 0C1 RD 90 C2IN AN2 CN4 RB2 97 98 PMPA13 CVREF AN1 det de PMPA13 CVREF AN1 COMPARATOR REF PMPA12 AN11 RB11 193 124 PMPA11 AN12 RB12 125 126 U2RTS BCLK2 RF
19. EADING This user s guide describes how to use the PIC32MX USB Starter Board The following Microchip documents are available and recommended as supplemental reference resources PIC32MX Data Sheet DS61143 Consult this document for detailed information on the PIC32MX 32 bit devices Reference information found in this data sheet includes e Device memory map e Device pinout and packaging details e Device electrical specifications e List of peripherals included on the device MPLAB C32 C Compiler User s Guide DS51686 This document details the use of Microchip s MPLAB C32 C Compiler for PIC32MX devices to develop an application MPLAB C32 is a GNU based language tool based on source code from the Free Software Foundation FSF For more information about FSF see their web site at http www Tei org MPLAB IDE User s Guide DS51519 Consult this document for more information pertaining to the installation and implementation of the MPLAB IDE software as well as the MPLAB Editor and MPLAB SIM Simulator software that are included with it Universal Serial Bus Specification and Associated Documents The Universal Serial Bus is defined by the USB 2 0 specification and its associated supplements and class specific documents These documents are available from the USB Implementor s Forum See their website at http www usb org THE MICROCHIP WEB SITE Microchip provides online support via our web site at http www mic
20. EDs Figure A 6 3 3V Power Supply USB HOST Power Supply USB Device OTG Power Supply 2008 Microchip Technology Inc DS61150B page 29 0 oBed goglL9s g oul ABojouyoe diy2049IN 8007 FIGURE A 2 PIC32_MCLR gt P32 VDD RG15 PMPDS RES PMPDG REG PMPD7 RE7 T2CLK RC1 P32_VDD T3CLK RC2 T4CLK RC3 R18 SDI1 TSCLK RC4 4 7K PMPAS SCK2 CN8 RG6 PMPA4 SDI2 CN9 RG7 PMPAZ SDO2 CN10 RGB PMPA2 S5S2 CN1 1 RG9 TMS RAQ INT1 RE8 INT2 RE9 9 VBUSON C1IN AN5 CN7 RBS USBOEN C1IN AN4 CN6 RB4 C2IN AN3 CN5 RB3 C2IN AN2 CN4 RB2 PGC1 AN1 CN3 RB1 PGD1 AN0 CN2 RB0 PIC32_ PGC2 16 17 18 20 21 22 23 24 25 PMPD4 RE4 PMPDS RES PMPD2 RE2 TRDO RG13 TRD1 RG12 TRD2 RG14 PMPD RE TRD3 RA7 TRCLK RAG 91 PMPDB RGO PMPD9 RG1 PIC32MX SCHEMATIC SHEET 1 OF 6 PIC32MX CPU D a P lt PMPD11 RF 87 CN19 PMPD13 RD13 IC5 PMPD12 RD12 PMPWR OC5 C13 RD4 OC4 RD3 PMPD15 CN16 RD7 PMPD14 CN15 RD6 PMPRD CN14 RD5 OC3 RD2_ 0C2 RD1 85 83 82 81 80 79 78 77 76 100 99 98 97 96 95 PMPD1 RE1 PMPD1 RE1 93 PMPD4 RE4 PMPD3 RE3 PMPD2 RE2 TRD0 RG13 TRD1 RG12 TRD2 RG14 PMPD REQ IVDD PMPDS RES PMPD6 RE6 PMPD7 RE7 T2CK RC1 T3CK RC2 IT4CK RC3 ISDI1 TSCK RC4 PMP
21. EQUIREMENTS To communicate with and program the starter board the following hardware and software requirements must be met e PC compatible system Two available USB ports on PC or powered USB hub Microsoft Windows XP or Windows Vista operating system The PIC32MX USB Starter Board has not been tested on Windows NT and Windows 2000 operating systems 2 4 INSTALLING THE PIC32MX USB STARTER BOARD SOFTWARE Starter board software and installation instructions are available on the Microchip com web site at the following URL http www microchip com PIC32USBboard The web page will guide you through installation and setup of MPLAB IDE MPLAB C32 C Compiler and the demo projects The page also provides links to other technical documents After completing the online installation instructions continue to the next section in this document 2008 Microchip Technology Inc DS61150B page 7 PIC32MX USB Starter Board User s Guide 2 5 USING THE PIC32MX USB STARTER BOARD OUT OF THE BOX Install software instructions in section 2 4 before connecting the board to the host PC The PIC32MX USB Starter Board may be used directly from the box as a demonstration board for the PIC32MX device The PIC32MX is preprogrammed with the classic Simon Says game simon says demo hex in the PIC32MX460F512L device and is ready for immediate use 2 5 1 How to Play the Game When the USB debug cable is plugged into the starter board s M
22. F4550 is hard wired to the PIC32MX device to provide two types of protocol translation I O pins of PIC18LF4550 to ICSP pins of PIC32MX e I O pins of PIC18LF4550 to JTAG pins of PIC32MX The PIC32MX USB Starter Board currently uses the JTAG pins of the PIC32MX device for programming and debugging 2007 Microchip Technology Inc DS61150B page 25 PIC32MX Starter Board User s Guide 4 2 4 PIC32MX USB Connectivity There are three possible ways to connect to the PIC32MX USB microcontroller HOST Mode Connect the device to the Type A connector J4 located on the top side of the USB starter board If using the Debug USB port to power the Host port install jumper JP2 to short the back power prevention diode Note that a maximum of 400 mA can be supplied from the Debug USB port to the Host port using this method If the full 500 mA supply is needed an external supply must be connected to the application board Also remove JP2 to prevent back powering the Debug USB port e DEVICE Mode First connect the debug Mini B USB cable to port J1 Next connect the USB starter board to the host using a cable with a Type B Micro plug to the USB starter board s Micro A B port J5 located on the bottom side of the USB starter board The other end of the cable must have a Type A plug Connect it to a USB host e OTG Mode Connectthe USB starter board to the OTG device using an OTG Micro A B cable to the Micro A B port J5 located on the bot
23. IC32 PGD2 RBO RE CK1SPP 25 pi 8 SPP ASTROBE 3 3V PIC32_ PGC2 RB1 RA5 gt FPGA_ RST R7 if DBG SMSCL RB2 RA4 P18_USB_DET MN 5V DUSB AAN 10K R9 R11 NIK DBG_ SMSDA FPGA TDI 3 3V TMS RAO P18 SPP CS t TCK RA1 CPU ON TDO RAS RC5 D RD3 SPP3 40 RD2 SPP2 DBG_SDO P18_SPP_DAT4 P18_SPP_DAT5 P18 SPP DAT6 P18 SPP DAT7 IS OO J JD OR IG IN MCLR RA2 4 RB4 CSSPP 15 16 9 RAQ 20 IRAT 12 RB3 AN9 21 Sc RB5 16 RB6 RB7 18 P18_MCLR P18 ICSP HEADER P18_PGD P18_ PGC S9HESU9S PIEO 19HEIS ASN XNWZEIId PIC32MX USB Starter Board User s Guide FIGURE A 4 PIC32MX SCHEMATIC SHEET 3 OF 6 APPLICATION BOARD CONNECTOR RE 5V EXT J2 RG15 1 2 TRD2 RG14 3 4 TRCLK RAG TRD1 RG12 gt g TRD3 RA7 TRACE CEI PMPD7 RE7 Z 8 TRDO RG13 PMPDG REG 9 d PMPDB RGO PMPDS RES 1 a PMPD9 RG1 PMP DATA 7 0 PMPD4 RE4 51 0 pe PMPD10 RF1 PMPD3 RE3 ees PMPD11 RF0 PMPD2 RE2 o 2 IC5 PMPD12 RD12 PMP DATA 15 8 PMPD1 RE1 Zo L CN19 PMPD13 RD13 PMPD REQ aan Ge PMP
24. OGRAM us m D u pnm Check sie sie si sii sie sie die sie sii sie siha sia sia sia ai ai isi isi ii iia ia ia si sia sia a a a a a a The starter board LEDs blink to indicate that the program is running successfully DS61150B page 24 2008 Microchip Technology Inc PIC32MX STARTER BOARD MICROCHIP USER S GUIDE Chapter A PIC32MX USB Starter Board Hardware 4 1 INTRODUCTION This chapter describes the hardware features of the PIC32MX USB Starter Board 4 2 HARDWARE FEATURES The key features ofthe PIC32MX USB Starter Board are listed below They are presented in the order given in Section 1 4 PIC32MX Functionality and Features You can refer to Figure 1 1 on page 6 for their locations on the board 4 2 1 Processor Support The PIC32MX USB Starter Board is designed with a permanently mounted i e soldered PIC32MX460F512L processor 4 2 2 Power Supply There are two ways to supply power to the PIC32MX USB Starter Board USB bus power connected to USB debug connector J1 e An external application board with a regulated DC power supply that provides 5V can be connected to the J2 application board connector that is provided on the bottom side of the board One green LED D3 is provided to show that the PIC32 microcontroller is powered up 4 2 3 Debug USB Connectivity The PIC32MX USB Starter Board includes a PIC18LF4550 USB microcontroller that provides debugger connectivity over USB The PIC18L
25. PIC32MX 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 PIC32MX Starter Board as a development tool to emulate and debug firmware on a target board The user guide is composed of the following chapters Chapter 1 Introducing the PIC32MX USB Starter Board provides a brief overview of the PIC32MX USB Starter Board highlighting its features and uses Chapter 2 PIC32MX USB Starter Board Tutorial provides step by step instructions for installing the PIC32MX USB Starter Board and using the Microchip MPLAB IDE to build and run the tutorial program on the PIC32MX USB Starter Board Chapter 3 Create a New Project provides step by step instructions for creating a new project using the MPLAB IDE and loading it onto the PIC32MX USB Starter Board Chapter 4 PIC32MX USB Starter Board Hardware provides the hardware description of the PIC32MX USB Starter Board Appendix A PIC32MX USB Starter Board Schematics provides a block diagram and detailed schematics of the PIC32MX USB Starter Board 2008 Microchip Technology Inc DS61150B page 1 PIC32MX USB Starter Board User s Guide CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions
26. S A Analog for the Digital Age Application Maestro CodeGuard dsPICDEM dsPICDEM net dsPICworks dsSPEAK ECAN ECONOMONITOR FanSense In Circuit Serial Programming ICSP ICEPIC Mindi MiWi MPASM MPLAB Certified logo MPLIB MPLINK mTouch PICkit PICDEM PICDEM net PICtail PIC32 logo PowerCal Powerlnfo PowerMate PowerTool REAL ICE rfLAB Select Mode Total Endurance 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 2008 Microchip Technology Incorporated Printed in the U S A All Rights Reserved e 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 MCUs and dsPIC DSCs KEELOG code hopping 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 DS61150B page ii 2008 Microchip Technology Inc PIC32MX USB STARTER MICROCHIP BOARD USER S GUIDE Table of Contents Preface
27. TARTING THE TUTORIAL PROJECT FIGURE 2 1 Connect the starter board to the host PC and click the MPLAB IDE icon on your computer desktop Select File gt Open Workspace from the menu bar and browse to the tutorial project file c pic32 solutions usb hid mouse device demo StarterBoard Mousedemo mcw or browse to the file path that you used when you installed the MPLAB IDE The pane on the left of the MPLAB IDE interface displays project files the c h and a library files that are used to build an application The project files are organized by type into folders Select Debugger gt Select Tool gt PIC32MX Starter Kit from the menu bar Starter Kit Found should then be displayed in the Output pane of the MPLAB IDE interface If not check the driver installation as well as the connections between the hardware and the PC MPLAB IDE WORKSPACE x usb bid mouse device demo starter board pic32mx460f5121 MPLAB IDE v8 02 C pic32_solutions Microchip USB hid device driver hide KS x C File Edit View Project Debugger Programmer Tools Configure Window Help 5 xj Os x m 8 Source Files A mouse demo c E mouse der B mouse_report c E E Header Files E EE EJ db utils h 5 usb_config h A object Files EI Library Files E db utils a E Linker Script Other Files usb hid mouse device demo starter board PEN a UJ C pic32_solutions usb_hid_mouse_device_c
28. c PIC32MX USB Starter Board Tutorial FIGURE 2 7 OUTPUT WINDOW Output Build Version Control Find in Files MPLAB PIC32MX Debugger Starter Kit Found All Memories Erasing Program Memory Programming Done Boot Memory and Configuration Memory Programming Done TargetOUT PIC32 USB HID Device Demo o TargetOUT SW1 Down SW2 Right SW3 Reverse 51 52 Direction Running MENEE To move the mouse cursor press the button switches on the starter board Table 2 1 shows the action associated with each button TABLE 2 1 BUTTONS FOR CURSOR MOVEMENT Button Pressed Mouse Cursor Action SW1 Moves Cursor Down SW2 Moves Cursor to Right SW1 and SW3 Moves Cursor Up SW2 and SW3 Moves Cursor Left To disable the HID mouse demo disconnect the host PC from the Micro AB receptacle on the starter board The host PC usually plays a reverse bong bing tone to indicate the successful disconnection of the peripheral device AEO NOZE 2008 Microchip Technology Inc DS61150B page 13 PIC32MX USB Starter Board User s Guide NOTES DS61150B page 14 2008 Microchip Technology Inc PIC32MX USB STARTER MICROCHIP BOARD USER S GUIDE Chapter 3 Create a New Project 3 1 INTRODUCTION This chapter explains how to create a new project 3 2 HIGHLIGHTS Items discussed in this chapter include e Creating a New Project e Buildin
29. ck on the Program All Memories icon on the Program Device Tool Bar as shown in Figure 2 3 FIGURE 2 3 PROGRAM DEVICE TOOL BAR esal Somer orl D H bD h dka kika kia AAA KEE EE KEE STARTER KIT Tutorial README A Programming Warning window shown in Figure 2 4 opens to warn you about over writing the memory Click Yes FIGURE 2 4 PROGRAMMING WARNING WINDOW Programming Warning D Are you sure you want to program overwrite the program boot and configuration memories The Output window shown in Figure 2 5 tracks the progress of the output A Done entry indicates that the programming of the device is complete FIGURE 2 5 OUTPUT WINDOW Output x Build Version Control Find in Files MPLAB PIC32MX Debugger Starter Kit Found All Memories Erasing Program Memory Programming Done Boot Memory and Configuration Memory Programming Done 2008 Microchip Technology Inc DS61150B page 11 PIC32MX USB Starter Board User s Guide 2 9 RUNNING THE PROGRAM Either click Debugger gt Run from the menu bar of the MPLAB IDE or click the Run icon the turquoise triangle on the Debug Tool Bar shown in Figure 2 6 to run the new program FIGURE 2 6 DEBUG WINDOW wi D um BB OP Check LAKE 2 10 TUTORIAL PROGRAM OPERATION The USB Human Interface Device HID mouse tutorial project demonstrates a simple USB peripheral
30. de as a platform for further experimentation Refer to Section 2 4 for download and installation instructions 1 3 KIT CONTENTS The PIC32MX USB Starter Board contains the following items e PIC32MX USB Starter Board e USB Mini B to full sized A cable USB debug cable to debug and power the board e USB Micro B to full sized A cable PIC32 USB cable to communicate with the PIC32 USB port If you are missing any part of the kit contact a Microchip sales office for assistance A list of Microchip offices for sales and service is provided on page 36 2008 Microchip Technology Inc DS61150B page 5 PIC32MX USB Starter Board User s Guide 1 4 PIC32MX FUNCTIONALITY AND FEATURES A representation of the layout of the PIC32MX USB Starter Board is shown in Figure 1 1 The board includes these key features as indicated in the diagram 1 PIC32MX460F512L 32 bit microcontroller 2 Green power indicator LED 3 Regulated 3 3V power supply for powering the starter board via USB or expansion board On board crystal for precision microcontroller clocking 8 MHz USB connectivity for on board debugger communications PIC18LF4550 USB microcontroller for on board debugging Orange Debug indicator LED Three push button switches for user defined inputs Three user defined indicator LEDs 0 Connector for various expansion boards on the underside of board 11 USB Type A receptacle connectivity for PIC32MX Host based Applications
31. eated 4 Click File gt Save As and save this file as blinkLED c in the same folder in this case the c MyProject folder 5 Now copy the source code provided in Example 3 1 to the blinkLED c file 2008 Microchip Technology Inc DS61150B page 19 PIC32MX USB Starter Board User s Guide EXAMPLE 3 1 PROJECT SOURCE CODE include lt plib h gt include PIC32 peripheral library int main void int i Setup LED s mPORTDClearBits BIT 0 Turn off LED1 on startup mPORTDSetPinsDigitalOut BIT 0 Make RDO LED1 as output mPORTDClearBits BIT 1 Turn off LED2 on startup mPORTDSetPinsDigitalOut BIT 1 Make RD1 LED2 as output mPORTDClearBits BIT 2 Turn off LED3 on startup mPORTDSetPinsDigitalOut BIT 2 Make RD2 LED3 as output while 1 for i 0 i lt 200000 i put a delay mPORTDToggleBits BIT 0 turn ON LED1 for i 0 i lt 200000 i put a delay mPORTDToggleBits BIT 1 turn ON LED2 for i 0 i lt 200000 i put a delay MPORTDToggleBits BIT 2 turn ON LED3 return 0 6 Inthe Project window right click on the Source Files folder Select Add Files and choose blinkLED c to add the file to the source directory see Figure 3 5 FIGURE 3 5 ADDING SOURCE FILES BlinkLED mcw J BlinkLED mcp
32. el 60 4 227 8870 Fax 60 4 227 4068 Philippines Manila Tel 63 2 634 9065 Fax 63 2 634 9069 Singapore Tel 65 6334 8870 Fax 65 6334 8850 Taiwan Hsin Chu Tel 886 3 572 9526 Fax 886 3 572 6459 Taiwan Kaohsiung Tel 886 7 536 4818 Fax 886 7 536 4803 Taiwan Taipei Tel 886 2 2500 6610 Fax 886 2 2508 0102 Thailand Bangkok Tel 66 2 694 1351 Fax 66 2 694 1350 EUROPE Austria Wels Tel 43 7242 2244 39 Fax 43 7242 2244 393 Denmark Copenhagen Tel 45 4450 2828 Fax 45 4485 2829 France Paris Tel 33 1 69 53 63 20 Fax 33 1 69 30 90 79 Germany Munich Tel 49 89 627 144 0 Fax 49 89 627 144 44 Italy Milan Tel 39 0331 742611 Fax 39 0331 466781 Netherlands Drunen Tel 31 416 690399 Fax 31 416 690340 Spain Madrid Tel 34 91 708 08 90 Fax 34 91 708 08 91 UK Wokingham Tel 44 118 921 5869 Fax 44 118 921 5820 01 02 08 DS61150B page 36 2008 Microchip Technology Inc
33. g the Project Programming the Device e Running the Program After completing this chapter you should be able to accomplish the following tasks e Create a project using the Project Wizard e Assemble and link the code and set the Configuration bits e Set up the MPLAB IDE to use the PIC32MXUSB Starter Board Program the chip and run the program 3 3 CREATING A NEW PROJECT The first step is to create a project and a workspace in the MPLAB IDE Typically there is a single project per workspace A project contains the files needed to build an application i e source code header files library etc and their corresponding build options A workspace contains one or more projects information on the selected device debug programmer tool and MPLAB IDE configuration settings MPLAB IDE contains a Project Wizard to help create a new project You will perform the following tasks as you create a new project Task 1 Select a Device page 16 Task 2 Select the Language Toolsuite page 17 Task 3 Name Your Project page 18 Task 4 Add Files to Your Project page 19 Task 5 Confirm the Configuration Settings page 21 Task 6 Build the Project page 22 Task 7 Program the Device
34. ini B debug recepta cle the three LEDs start blinking to indicate the start of a new game Begin the game by pressing one of the switches SW1 SW3 to choose the level of game difficulty SW3 is the easiest SW1 is the hardest The goal is to imitate the light patterns as long as you can without getting frazzled Ultimately you will make a mistake and all of the LEDs will light up to signal the end of the game After a brief pause you can press any switch to start a new game If you launch MPLAB IDE and connect to the starter board while the game is running the game will stop Further if you perform a debug or program operation from MPLAB IDE the demo application will be replaced with the current MPLAB project application However the game can be reloaded onto the starter board by opening the file simon says demo mcw from c Program Files Microchip pic32 solutions simon says demo The preprogrammed example code on the PIC32MX has been included in the PIC32MX USB Starter Board demo projects download file located at the following URL http www microchip com PIC32USBboard All project files have been included so that the code may be used directly to restore a PIC32MX to its original state i e if the sample device has been reprogrammed with another program or so you can use the tutorial code as a platform for further experimentation DS61150B page 8 2008 Microchip Technology Inc PIC32MX USB Starter Board Tutorial 2 6 S
35. is available through the web site http support microchip com DOCUMENT REVISION HISTORY Revision A June 2008 This is the initial release of the PIC32MX USB Starter Board User s Guide Revision B October 2008 Modified the number of ways to supply power under Section 4 2 2 Power Supply DS61150B page 4 2008 Microchip Technology Inc PIC32MX USB STARTER MICROCHIP BOARD USER S GUIDE Chapter 1 Introducing the PIC32MX USB Starter Board 1 1 INTRODUCTION Thank you for purchasing the Microchip Technology PIC32MX USB Starter Board This board provides a low cost modular development system for Microchip s new line of 32 bit microcontrollers The starter board comes pre loaded with demonstration software for the user to explore the new features of the PIC32MX It is also expandable through a modular expansion interface which allows the user to extend its functionality The PIC32MX USB Starter Board also supplies on board circuitry for full debug and programming capabilities 1 2 HIGHLIGHTS This chapter covers the following topics e Kit Contents e PIC32MX Functionality and Features The preprogrammed example code on the PIC32MX MCU is available via download All project files have been included so that the code may be used directly to restore the PIC32MX MCU on the starter board to its original state i e if the sample device has been reprogrammed with another program or so you can use the tutorial co
36. ls These include the MPLAB C18 MPLAB C30 and MPLAB C32 C compilers ASM32 MPASM and MPLAB ASM30 assemblers MPLINK and MPLAB LINK30 MPLAB LINK32 object linkers and MPLIB and MPLAB LIB30 object librarians Emulators The latest information on Microchip in circuit emulators This includes the MPLAB REAL ICE and MPLAB ICE 2000 in circuit emulators In Circuit Debuggers The latest information on the Microchip in circuit debuggers This includes the MPLAB ICD 2 and PICkit 2 MPLAB IDE The latest information on Microchip MPLAB IDE the Windows Integrated Development Environment for development systems tools This list is focused on the MPLAB IDE MPLAB IDE Project Manager MPLAB Editor and MPLAB SIM simulator as well as general editing and debugging features Programmers The latest information on Microchip programmers These include the MPLAB PM3 device programmer and the PICSTART Plus PICkit 1 and PICkit 2 development programmers CUSTOMER SUPPORT Several channels are available to assist the users of Microchip products e Distributor or Representative e Local Sales Office e Field Application Engineer FAE Technical Support e Development Systems Information Line Customers should contact their distributor representative or FAE for support Local sales offices are also available to help customers A list of sales offices and locations is included in the back of this document Technical support
37. ochip PIC32 C Compiler Toolsuite The toolsuite includes the compiler assembler and linker that will be used If the PIC32 compiler option is not available check the Show all installed toolsuites box 2 Click Next to continue The Project Wizard Step Three dialog opens as shown in Figure 3 3 nn 2008 Microchip Technology Inc DS61150B page 17 PIC32MX USB Starter Board User s Guide FIGURE 3 3 NAMING YOUR PROJECT Project Wizard Step Three Create a new project or reconfigure the active project Create New Project File C MyProject BlinkLED Browse 3 3 3 Task 3 Name Your Project 1 Inthe Create New Project File field type C MyProject BlinkLED 2 Click Next and Ok to continue The Project Wizard Step Four dialog opens as shown in Figure 3 4 DS61150B page 18 2008 Microchip Technology Inc Create a New Project FIGURE 3 4 ADDING FILES TO THE PROJECT Project Wizard Step Four Add existing files to your project B 22 s gt zoo 3 3 4 Task 4 Add Files to Your Project This window can be skipped since no c files have been created 1 Click Next to continue 2 Click Finish on the summary screen A project and workspace have been created in the MPLAB IDE BlinkLED mcw is the workspace file and B1inkLED mcp is the project file 3 Click File gt New from the menu bar to create a new file A new file is cr
38. onnector for expansion boards 6 C Debug indicator LEI 6 On board crystal 6 a Project PIC18LF4550 USB microcontroller 6 uild the Project 22 Configuration settings 21 BOER SUPPIY ee 6 9 ngs Power indicator LED 6 Customer Change Notification Service 4 A Customer Support im wawamwa 4 SWIC BSS OS D AA 6 USB connectivity 6 D User defined LEDS 6 Documentation PIC32MX Out of the box 8 Conventions siccccinian u RE N 2 Preprogrammed example code 8 F Project Wizard issue demeurent 15 Free Software Foundation 3 R G Restore PIC32MX original programming 8 GNU Language Tools nr ee ee ee ee 3 S Schematics H Application board connector 32 Hardware Features PIC18LF4550 Debug CPU 31 EEDS sg ia ee bee aS B SLA 26 PIG32MX GPU rr ka a bus nissa 30 Oscillator Options EE 26 Power Supply ne 4e ee 34 PICtail Plus Card Edge Connectors 27 Switches and LEDS 33 Power Supply 2 EES ee EE BES Ee VER Ge Dee Ke ide 25 Starter Kit Board
39. p Technology Inc Create a New Project 3 3 7 Task 7 Program the Device 1 Click the Program All Memories icon on the Program Device Tool Bar as shown in Figure 3 8 FIGURE 3 8 PROGRAM DEVICE WINDOW e sel EB ARS v ux gt mo SSO ee ee sii sie alie ee ee ee eee ee ee ee ee ee ee eee ee ee ee TT STARTER KIT Tutorial README A Programming Warning window opens to warn you about overwriting the memory as shown in Figure 3 9 2 Click Yes FIGURE 3 9 PROGRAMMING WARNING WINDOW Programming Warning D Are you sure you want to program overwrite the program boot and configuration memories The Output window shown in Figure 3 10 tracks the progress of the output Done signals that the programming of the device is complete FIGURE 3 10 OUTPUT WINDOW Build Version Control Find in Files MPLAB PIC32Mx Erasing Program Memory Done Boot Memory and Configuration Memory Done All Memories Erasing Program Memory Programming Done Boot Memory and Configuration Memory Programming Done 2008 Microchip Technology Inc DS61150B page 23 PIC32MX USB Starter Board User s Guide 3 3 8 Task 8 Run the Program Click Debugger gt Run from the menu bar of the MPLAB IDE or click the Run icon the turquoise triangle on the Debug Tool Bar as indicated in Figure 3 11 to run the new program FIGURE 3 11 RUN THE PR
40. rochip com This web site makes files and information easily available to customers Accessible by most Internet browsers the web site contains the following information e 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 listings Business of Microchip Product selector and ordering guides latest Microchip press releases listings of seminars and events and listings of Microchip sales offices distributors and factory representatives 2008 Microchip Technology Inc DS61150B page 3 PIC32MX USB Starter Board User s Guide 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 http www microchip com click on Cus tomer 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 too
41. tom side of the USB starter board The USB starter board provides an on board power supply capable of providing 120mA Max This supply is controlled by the PIC32MX460 microcontroller 4 2 5 Switches Push button switches provide the following functionality e SW1 Active low switch connected to RD6 e SW2 Active low switch connected to RD7 e SW3 Active low switch connected to RD13 The switches do not have any debounce circuitry and require the use of internal pull up resistors this allows you to investigate software debounce techniques When Idle the switches are pulled high 3 3V When pressed they are grounded 4 2 6 LEDs The RDO through RD2 LEDs are connected to PORTD of the processor The PORTD pins are set high to light the LEDs 4 2 7 Oscillator Options The installed microcontroller has an oscillator circuit connected to it The main oscillator uses an 8 MHz crystal Y2 and functions as the controller s primary oscillator Use of an external crystal is required to develop USB applications USB specification dictates frequency tolerance of 0 25 for full speed Non USB applications can use the internal oscillators The USB starter board also has provisions for an external secondary oscillator Y3 however this is not populated The PIC18LF4550 is independently clocked and has its own 8 MHz crystal Y1 DS61150B page 26 2007 Microchip Technology Inc PIC32MX USB Starter Board Hardware 4 2 8 120 Pin Mod
42. ular Expansion Connector The PIC32MX USB Starter Board has been designed with a 120 pin modular expansion interface which allows the board to provide basic generic functionality now and easy extendability to new technologies as they become available TABLE 4 1 STARTER BOARD CONNECTOR PART NUMBERS HIROSE Electric PN Starter Board Connector FX10A 120P 12 SV1 71 Application Board Connector FX10A 120S 12 SV 71 2007 Microchip Technology Inc DS61150B page 27 PIC32MX Starter Board User s Guide NOTES DS61150B page 28 2007 Microchip Technology Inc PIC32MX USB STARTER MICROCHIP BOARD USER S GUIDE Appendix A PIC32MX USB Starter Board Schematics A 1 INTRODUCTION This section provides detailed technical information about the PIC32MX USB Starter Board A 2 DEVELOPMENT BOARD BLOCK DIAGRAM FIGURE A 1 HIGH LEVEL BLOCK DIAGRAM OF THE PIC32MX USB STARTER BOARD 3 3V _ USB OTG Device Power Supply 120 ma Max Device OTG Type Micro A B VUSB or 5V_EXT VUSB or EE USB Host Host Power Supply Type A ICSPTM JTAG Debug USB 5V EXT PIC18LF4550 PIC32MX460F512L Application Board Connector Switches LEDs lt Note 1 From Debugger USB Port AA STARTER BOARD SCHEMATICS Figure A 2 PIC32MX CPU Figure A 3 PIC18LF4550 Debug CPU Figure A 4 Application Board Connector Figure A 5 Switches and L
43. uu a O i ee ans 1 IA EER A 1 Document EE 1 Conventions Used in this Guide wawa wamama manana wania kiaina eneee n 2 Recommended Reading 3 The Microchip Web Site ee eek ee Re ee ee 3 Development Systems Customer Change Notification Service 4 Customer SUDDOF SR KEES EENS GEL Ee Ge DER GER ME Ee SEE ee Gee EER EK ee Ee AR EE ee v 4 Document Revision History wwwwwwwwamemamwmwwa mumu wuwuwuwuwuwum www www waitwa 4 Introducing the PIC32MX USB Starter Board 5 lge ee TEE 5 wie JA ES In LEE 5 Bel EER OR LE a 5 PIC32MX Functionality and Features 6 PIC32MX USB Starter Board Tutorial 7 alte el EE 7 elle lU ER OE am alikua D 7 Host Computer Requirements ee ee 7 Installing the PIC32MX USB Starter Board Software 7 Using the PIC32MX USB Starter Board Out of the Box 8 Starting the RENE EE 9 Building the Project EE 10 Programming the Device eee II 11 Rufifiing tie Programs O L nn de Sud nues RE Be G N de RENE 12 Tutorial Program Operation iis is EE BEER SEER REK ee SR SE Re GR EIE We Ee Gee AR Rene 12 Create a New Project uuu I a 15 ale ele 15 elle lte EE EN 15 Creating a New Pro EE RR en EE AG Eg ee ED ee nene 15 PIC32MX USB Starter Board Hardware esse see ee ee Re u u
Download Pdf Manuals
Related Search
Related Contents
MCDA-208/WC106 SA-4563 Guide d`installation rapide OPERATING INSTRUCTIONS MOBILE WASHBASIN Estimación del Error en un Medidor de Turbina con Copyright © All rights reserved.
Failed to retrieve file