PICDEM™ Lab II Development Board User’s Guide 2015 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.
PICDEM™ LAB II DEVELOPMENT BOARD USER’S GUIDE Table of Contents Preface ........................................................................................................................... 5 Chapter 1. Introduction to PICDEM™ Lab II 1.1 PICDEM Lab II Development Board Kit Contents .......................................... 9 1.2 PICDEM Lab II Development Board Layout ................................................. 10 1.3 Power Sources ................................................................
PICDEM™ Lab II Development Board User’s Guide NOTES: DS40001814A-page 4 2015 Microchip Technology Inc.
PICDEM™ LAB II DEVELOPMENT 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.
PICDEM™ Lab II Development Board User’s Guide 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 Examples Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB® IDE U
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.
PICDEM™ Lab II Development Board User’s Guide 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.
PICDEM™ LAB II DEVELOPMENT BOARD USER’S GUIDE Chapter 1. Introduction to PICDEM™ Lab II The PICDEM Lab II Development Board supports Microchip's 6-, 8-, 14-, 18-, 20-, 28-, and 40-pin 8-bit PIC® MCUs. Dual-row expansion headers on either side of each microcontroller sockets offer flexibility of connectivity to all pins on the PIC MCUs. This board provides flexibility for experimentation through a large solderless development block, a USB-Serial/I2C interface and external board connectors.
PICDEM™ Lab II Development Board User’s Guide 1.2 PICDEM LAB II DEVELOPMENT BOARD LAYOUT Figure 1-2 identifies the major features of the PICDEM Lab II Development Board. FIGURE 1-2: 1 PICDEM™ LAB II DEVELOPMENT BOARD LAYOUT 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. DS40001814A-page 10 19 20 21 22 23 24 Power connector (GND, GND, +VVAR, +3.3V, +3.
1.3 POWER SOURCES The PICDEM Lab II Development Board can be powered in one of three ways, depending on its usage. 1.3.1 USB Connector (J18) The USB connector (J18) will power the entire PICDEM Lab II Development Board. Shunt jumpers must be placed onto jumpers J2 and J6 (Figure 1-2). Shunt jumpers connecting the center and right pins of J2 and J6 will connect the internal regulators to the USB supply on J18.
PICDEM™ Lab II Development Board User’s Guide 1.5 CONNECTING THE USB I2C/ASYNC COMMUNICATIONS There are two connections to the on-board USB I2C/ASYNC interface: the first is a USB mini-B connector J18, and the second is the on-board connector J4. A standard USB cable should be plugged into J18 and the PC/Apple computer to be used as an interface. If the driver for the MCP2221 has not been loaded, it should be loaded prior to connecting to the PICDEM Lab II Development Board. See Section 2.
1.7 INSTALLING EXPANSION BOARDS AND AN LCD MODULE Installing an expansion board on the PICDEM Lab II Development Board is very simple, provided the expansion board uses a single row 0.100” right angle, or vertical header. Simply push the pins of the header into the horizontal sockets of J8. Power, output and input pins from the expansion board can then be connected to the on-board circuitry using the vertical sockets of J8.
PICDEM™ Lab II Development Board User’s Guide NOTES: DS40001814A-page 14 2015 Microchip Technology Inc.
PICDEM™ LAB II DEVELOPMENT BOARD USER’S GUIDE Chapter 2. Getting Started The PICDEM Lab II Development Board must be used with the MPLAB X Integrated Development Environment (IDE) and either a PICkit™ 3 programmer/debugger, REAL-ICE in-circuit emulator or ICD3 programmer/debugger. The MPLAB X IDE is available free on Microchip's web site, www.microchip.com. Use version v3.05 or later.
PICDEM™ Lab II Development Board User’s Guide Note: 2.2 VVAR is generated from the 5V input in all power supply modes of operation. Adjustment of VVAR is via potentiometer R7 (see item 13 in Figure 1-2). Full clockwise rotation of the potentiometer will result in approximately 1.5V, and full counterclockwise rotation will result in approximately 4.8V.
FIGURE 2-2: MCP2221 DRIVER UNZIP Finally, follow the direction of the installation tool until finished. At this point, the driver for the asynchronous serial port will be leaded and ready for use. Any asynchronous serial port terminal program can now be used. Select the Com port corresponding to the MCP2221 and configure the baud rate, Stop bits, and parity as necessary for the application.
PICDEM™ Lab II Development Board User’s Guide Unzip and double click on the MCP2221 terminal installer program (Figure 2-4). FIGURE 2-4: DS40001814A-page 18 MCP2221 I2C/SMBus TERMINAL UNZIP 2015 Microchip Technology Inc.
Finally, follow the direction of the installation tool until finished. At this point, the Terminal program is ready for use – just double click to open. The Terminal program should appear as in Figure 2-5. MCP2221 I2C/SMBus TERMINAL WINDOW FIGURE 2-5: 1 2 3 4 5 6 7 8 9 10 11 1. 2. 3. 4. 5. 6. 7. 8. SAVE: This button will save the current set of commands to a .cvs file. PROTOCOL: This pull-down box is used to select I2C. ADDRESS LENGTH: This box is used to select 7- or 10-bit addressing.
PICDEM™ Lab II Development Board User’s Guide 2.4 LOADING MPLAB X IDE AND THE XC COMPILER The MPLAB X IDE and XC8/16/32 compilers can be downloaded from the Microchip web page under the heading of Design Support. While the IDE is free to download, the XC8/16/32 compilers require a licensing fee for the professional version. A short term evaluation version is available, as well as a student version.
Finally, select the appropriate operating system for the computer (Figure 2-8). FIGURE 2-8: MPLAB X IDE DOWNLOAD SELECTION Once the file is downloaded, double click on the file and follow the installation instructions provided with the install packages. If unfamiliar with MLAB X, there are several webinars available to help getting started (Figure 2-9). FIGURE 2-9: Note: 2015 Microchip Technology Inc.
PICDEM™ Lab II Development Board User’s Guide 2.5 LOADING MCC INTO MPLAB X MCC can be downloaded within the MPLAB X IDE by selecting the Tools tab at the top of the window and then selecting Plugins from the resulting drop-down window (Figure 2-10). FIGURE 2-10: LOADING MCC INTO MPLAB® X When the Plugins window appears, click on the table for Available Plugins and select MCC from the list of options and click on the Install button at the bottom left of the window.
PICDEM™ LAB II DEVELOPMENT BOARD USER’S GUIDE Chapter 3. Where to Find the Lab Documentation 3.1 OUT-OF-THE-BOX LABS The out-of-the-box labs can be downloaded from the Microchip web page under the PICDEM Lab II product page. FIGURE 3-1: OUT-OF-THE-BOX LABS The four labs that use the included components are: 1. Hello world embedded lab: This lab is an introductory lab to make the user acquainted with operation of the PICDEM Lab II and the development tool suite.
PICDEM™ Lab II Development Board User’s Guide 4. Class D audio amplifier lab: This lab retrieves sound wave table information from a serial EEPROM and uses a Class D audio amplifier configuration to drive a small speaker. The retrieval of the wave table utilizes the I2C capability of the MSSP peripheral.
PICDEM™ LAB II DEVELOPMENT BOARD USER’S GUIDE Chapter 4. Troubleshooting 4.1 THE BOARD WILL NOT POWER-UP • If the power indicator LEDs LD1 and LD2 do not light: - Verify power is connected to the board. - If the 9V input is used, verify the switch SW1 is in the on position. - Verify the jumpers on J2 and J6 are placed correctly. - Verify the 3.3V and 5.0V outputs are not shorted to GND. • If only one of the power indicator LEDs does not light: - Verify the jumpers on J2 and J6 are placed correctly.
PICDEM™ Lab II Development Board User’s Guide 4.3 SERIAL/I2C COMMUNICATIONS DO NOT WORK • If the PICDEM Lab II serial interface is not recognized by the ASYNC terminal program: - Verify that the serial driver for the MCP2221 is correctly loaded. - Verify the USB interface cable is firmly seated in the PICDEM Lab II board. - Verify the USB interface cable is firmly seated in the USB port of the computer. - Verify the USB port used is working.
D C B A 3 SGND SGND 1 3 2 1 U9 2 TC1187 2 4 3 1uF 16V 4 5 SGND 2.7k 1% R8 SGND 1 0.1uF 16V C14 10k 3386F 10% R7 2 3 SGND SGND 1 10k 1% 1uF 16V VBUS DD+ ID GND 10k 1% 15µH 2 USB MINI-B Female J18 SGND J3 J2 1 2 3 10uF 25V C7 SGND J7 10k R1 TP LOOP Black TH TP4 U12_RX U12_TX GP2 3 1 2 3 4 5 6 7 U12 VDD VSS GP0 D+ GP1 DRST VUSB UART RX SCL UART TX SDA GP2 GP3 MCP2221 SGND GP0 GP1 Vusb5 +3.
DS40001814A-page 28 D C C20 1 VDD3 U3_RA5 C22 U3_RA4 0.1uF VPP3 25V U3_RC5 0603 U3_RC4 U3_RC3 U3_RC6 U3_RC7 SGND U3_RB7 SGND 0.
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://www.microchip.com/ support Web Address: www.microchip.