Professional Documents
Culture Documents
Development Board
User’s Guide
• 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.
QUALITY MANAGEMENT SYSTEM Microchip received ISO/TS-16949:2009 certification for its worldwide
CERTIFIED BY DNV 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
== ISO/TS 16949 == are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® 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.
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 ............................................................................................. 11
1.3.1 USB Connector (J18) ................................................................................ 11
1.3.2 9V External Power Supply (J1) ................................................................. 11
1.3.3 External Supply Connection Points ........................................................... 11
1.4 Connecting the PICkit™ Programmer/Debugger ......................................... 11
1.5 Connecting the USB I2C/ASYNC Communications ..................................... 12
1.6 Installing MikroElektronika Click™ Boards ................................................... 12
1.7 Installing Expansion Boards and an LCD Module ........................................ 13
Chapter 2. Getting Started
2.1 Connecting Power to the PICDEM Lab II ..................................................... 15
2.1.1 USB Connector (J18) ................................................................................ 15
2.1.2 9V External Power Supply (J1) ................................................................. 15
2.1.3 External Supply Connection Points ........................................................... 15
2.2 Connecting a Programmer/In-Circuit Debugger ........................................... 16
2.3 Loading Drivers and Terminal Programs for the USB-ASYNC/I2C Interface 16
2.4 Loading MPLAB X IDE and the XC Compiler ............................................... 20
2.5 Loading MCC into MPLAB X ........................................................................ 22
Chapter 3. Where to Find the Lab Documentation
3.1 Out-of-the-Box Labs ..................................................................................... 23
3.2 Additional Labs ............................................................................................. 24
3.3 Obtaining Lab Components .......................................................................... 24
Chapter 4. Troubleshooting
4.1 The board will not power-up ......................................................................... 25
4.2 The microcontroller will not program/debug ................................................. 25
4.3 Serial/I2C communications do not work ....................................................... 26
Appendix A. Schematics
Worldwide Sales and Service .................................................................................... 29
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
“DSXXXXXXXXA”, where “XXXXXXXX” 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
PICDEM™ Lab II Development Board. 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
• Revision History
DOCUMENT LAYOUT
This document describes how to use the PICDEM Lab II Development Board as a
development tool to emulate and debug firmware on a target board, as well as how to
program devices. The document is organized as follows:
• Chapter 1. “Introduction to PICDEM™ Lab II” – This chapter contains general
information regarding the PICDEM Lab II Development Board kit contents, layout
and power source.
• Chapter 2. “Getting Started” – This chapter offers information on how to
program microcontrollers loaded onto the PICDEM Lab II Development Board,
general information on the prototyping area, and how to load the MCP2221
I2C/SMBus Terminal program.
• Chapter 3. “Where to Find the Lab Documentation” – Consult this chapter for
troubleshooting information.
• Appendix A. “Schematics” – This appendix lists the PICDEM Lab II
Development Board schematic.
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 “Save project before build”
dialog
Underlined, italic text with A menu path File>Save
right angle bracket
Bold characters A dialog button Click OK
A tab Click the Power tab
N‘Rnnnn A number in verilog format, 4‘b0010, 2‘hF1
where N is the total number of
digits, R is the radix and n is a
digit.
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Filenames autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, ‘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 void main (void)
user { ...
}
RECOMMENDED READING
This user's guide describes how to use the PICDEM Lab II Development Board. For the
latest information on using other tools, refer to the MPLAB® X IDE home page:
www.microchip.com/mplabx/. This resource page contains updated documentation,
downloads and links to other MPLAB X compatible tools, plug-ins and much more.
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at:
http://www.microchip.com/support.
REVISION HISTORY
Revision A (August 2015)
Initial release of this document.
11
12
13
14
15
16
17
18 19 20 21 22 23 24
Note: 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.
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.
To install the Microchip MCP2221 I2C/SMBus terminal program installation package
(Figure 2-3) from Microchip’s MCP2221 web page, follow the steps below.
1. SAVE: This button will save the current set of commands to a .cvs file.
2. PROTOCOL: This pull-down box is used to select I2C.
3. ADDRESS LENGTH: This box is used to select 7- or 10-bit addressing.
4. ADDRESS: This box is used to select the address to the device.
5. OPERATION: This box is used to select Read/Write/Set VREF.
6. IMPORT: This button will allow the importation of a set of commands.
7. DATA: For writes, this is the data to be sent. For reads, this is the count.
8. RECEIVED/SENT DATA: This window shows the results of a command, all read and
written data will appear here with a green OK if command was successful.
9. SEND: This button will execute the adjacent command.
10. SPEED: This window is used to select the bus speed 100/400 kb/s.
11. SELECT DEVICE: This window selects the MCP2221 required for communications. If
only one device is on the system, then only one option will appear.
Then click on the MPLAB X IDE Downloads option on the left-hand side of the screen
(Figure 2-7).
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).
Note: The MPLAB® X installation will prompt the user about installing the XC
compilers as part of its install. Click Yes at the prompt, and copies of the XC
compilers will be downloaded and installed.
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. The IDE will then download and install the MCC within MPLAB X.
To open MCC within MPLAB X, select the Tools window, select the Embedded tab, and
then click on the MPLAB Code Configurator option.
For additional information on the operation of the MCC refer to the training materials
available on the Microchip website.
The labs will be organized by the processor used in the lab, and will be grouped with
other labs using the same microcontroller. In the event that multiple microcontrollers
can support a given lab, the lab will be modified for the additional microcontrollers and
included in the zip file download for the microcontrollers.
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.
- Verify that the missing voltage output is not shorted to GND.
• If both power indicator LEDs light but VVAR is missing:
- Verify that the VVAR voltage output is not shorted to GND.
- Verify the voltage adjustment potentiometer R7 is not broken.
For all other problems, consult Microchip’s online help system.
+5V
J1 10uF 1
1 C2
2 +3.3V
3
3
2
C3 10uF 4 +Vvar
POWER 2.5mm 5
A A
6 9 8
SGND C4 10uF AN PWM
7
25V TP1 TP2 10 7
0805
1
EN BOOST 2 +5V 12 5
3
4 SCK TX 5
0.1uF L1 1
4 6 SGND 5 4
VIN SW 2 +3.3V 13 4
22µH 6 MISO SCL 3
R3 3
2 1 7 2
VCC FB C6 C7 4 +Vvar 14 3
8 MOSI SDA 1
AGND
PGND
52.3k 1% 10uF 10uF 5 +3.3V +5V
C8 R4 25V 25V 6 15 2
10k J24 +3.3V +5V J25
8
5
1uF 7
1%
16V 16 1
SGND SGND GND GND
J8
SGND
SGND SGND
SGND J35 SGND
SGND SGND
1 1
2 2 mikroBUS
TP3 TP4 3 3
1
3 7 2 7 7 9 8
EN BOOST 3
AN PWM
8 8
0.1uF L2 SGND
4 6 9 9 10 7
VIN SW RST INT
15µH 10 10
R5 1 8
2 1 11 11 11 6
VCC FB C10 C11 2 CS RX 7
12 12
AGND
PGND
31.2k ±0.1% 10uF 10uF 3 6
R6 13 13 12 5
C12 25V 25V 4 SCK TX 5
10k 14 14
8
5
1uF 5 4
1% 15 15 13 4
16V 6 MISO SCL 3
SGND SGND 16 16
7 2
17 17 14 3
8 MOSI SDA 1
SGND SGND 18 18 +3.3V +5V
SGND SGND 19 19 15 2
J26 +3.3V +5V J27
20 20
16 1
GND GND
J9 J10
MCP1702-3302E/CB
VDUT SGND SGND
Vusb5 U8 Vusb3
3 2
VIN VOUT
mikroBUS
GND R9
C13 C14
1 200k
J32
DNP
3 4 R7 SGND 6
SHDN ADJ 10k 16V Vusb5 UART_RX
3386F C16 Vusb3 U10 VDUT C17 J4
10% 6 1
SGND VCCBVCCA
TC1187 MCP2221 2
0.1uF GND 0.1uF
5
SGND DIR
R8 4 3
J18 U12_TX B A UART_TX
2.7k R1 1 14 SGND SGND
Vusb5 VDD VSS Drawn By:
1% 10k 2 13 SN74LVC1T45DCKR SGND
1 GP0 GP0 D+ USB_P 219-0544
PICDEM™ LAB II DEVELOPMENT BOARD SCHEMATIC 1
VBUS 3 12
2 GP1 GP1 D- USB_N
D- USB_N 4 11 Engineer:
D 3 RESET RST VUSB D
SGND D+ USB_P 5 10 219-0544
4 U12_RX UART RX SCL U12_SCL
ID 6 9 C18 Vusb3 U11 VDUT C19
5 U12_TX UART TX SDA U12_SDA C1 PartNumber: Project Title
GND 7 8 6 1
GP2 GP2 GP3 GP3 0.47uF VCCBVCCA 219-0544
2 PICdem Lab 2
6.3V GND
0
U12 0.1uF 5 0.1uF Sheet Title Designed with
USB MINI-B Female SGND 0603 DIR
4 3 **
U12_RX B A UART_RX
SGND
Size Sch #:03-219-0544 Date: 11/25/2014 9:48:30 AM
SGND SN74LVC1T45DCKR SGND B Revision: ProjectRevisionSCH
Sheet * of * Altium.com
File: 219-0544.SchDoc
1 2 3 4 5 6
BOARD USER’S GUIDE
PICDEM™ LAB II DEVELOPMENT
DS40001814A-page 27
1 2 3 4 5 6
FIGURE A-2:
U1
2 3
VDD1 VDD GP2/T0CKI/COUT/FOSC4 U1_GP2
1 2 1 2 U2
VPP1 VPP1
3 4 8 4 3 4
VDD1 VDD1 VDD1 VPP1 GP3/MCLR/VPP GP1/ICSPCLK/CIN- ICSPCLK1
5 6 5 6 1 2 1 18 1 2
U1_GP2 U1_GP2 U2_RA2 U2_RA2 U2_RA1 U2_RA1
DS40001814A-page 28
7 8 7 5 7 8 3 4 2 17 3 4
A C20 ICSPCLK1 ICSPCLK1 VSS GP0/ICSPDAT/CIN+ ICSPDAT1 ICSPDAT1 U2_RA3 U2_RA3 U2_RA0 U2_RA0 A
5 6 3 16 5 6
0.1uF U2_RA4 U2_RA4 U2_RA7 U2_RA7
J12 PIC10F200-I/P J13 7 8 4 15 7 8
25V VPP2 VPP2 U2_RA6 U2_RA6
SGND 9 10 5 14 9 10
0603 VDD2 VDD2
11 12 6 13 11 12
U2_RB0 U2_RB0 ICSPDAT2 ICSPDAT2
SGND 13 14 7 12 13 14
U2_RB1 U2_RB1 ICSPCLK2 ICSPCLK2 C21
SGND 15 16 8 11 15 16
U2_RB2 U2_RB2 U2_RB5 U2_RB5 0.1uF
SGND 17 18 9 10 17 18
U2_RB3 U2_RB3 U2_RB4 U2_RB4 25V
0603
J14 110-99-318-41-001 J15
SGND
SGND
U4
1 28
VPP4 ICSPDAT4
2 27
RA0 ICSPCLK4
3 26
RA1 RB5
4 25
RA2 RB4
5 24
RA3 RB3
ICSP1 ICSP2 ICSP3 ICSP4 6 23
RA4 RB2
1 1 1 1 7 22
B VPP1 VPP2 VPP3 VPP4 RA5 RB1 B
2 2 2 2 8 21
VDD1 VDD2 VDD3 VDD4 RB0
3 3 3 3 9 20
RA7 VDD4
4 4 4 4 10 19
ICSPDAT1 ICSPDAT2 ICSPDAT3 ICSPDAT4 RA6
5 5 5 5 SGND 11 18
ICSPCLK1 ICSPCLK2 ICSPCLK3 ICSPCLK4 RC0 RC7
6 SGND 6 SGND 6 SGND 6 SGND 12 17
RC1 RC6
13 16 SGND
RC2 RC5
HDR-2.54 Male 1x6 HDR-2.54 Male 1x6 HDR-2.54 Male 1x6 HDR-2.54 Male 1x6 14 15
RC3 RC4
110-91-328-41-001
U5
1 2 1 40 1 2
VPP4 VPP4 ICSPDAT4 ICSPDAT4
3 4 2 39 3 4
RA0 RA0 ICSPCLK4 ICSPCLK4
5 6 3 38 5 6
RA1 RA1 RB5 RB5
7 8 4 37 7 8
RA2 RA2 RB4 RB4
9 10 5 36 9 10
RA3 RA3 RB3 RB3
11 12 6 35 11 12
RA4 RA4 RB2 RB2
U3 13 14 7 34 13 14
RA5 RA5 RB1 RB1
C 15 16 8 33 15 16 C
RE0 RE0 RB0 RB0
1 2 1 20 1 2 17 18 9 32 17 18
VDD3 VDD3 RE1 RE1 VDD4 VDD4
3 4 2 19 3 4 19 20 10 31 19 20
U3_RA5 U3_RA5 ICSPDAT3 ICSPDAT3 RE2 RE2
5 6 3 18 5 6 21 22 11 30 21 22
C22 U3_RA4 U3_RA4 ICSPCLK3 ICSPCLK3 VDD4 VDD4 RD7 RD7
7 8 4 17 7 8 SGND 23 24 12 29 23 24
0.1uF VPP3 VPP3 U3_RA2 U3_RA2 RD6 RD6
9 10 5 16 9 10 25 26 13 28 25 26
25V U3_RC5 U3_RC5 U3_RC0 U3_RC0 RA7 RA7 RD5 RD5
11 12 6 15 11 12 27 28 14 27 27 28
0603 U3_RC4 U3_RC4 U3_RC1 U3_RC1 RA6 RA6 RD4 RD4
13 14 7 14 13 14 29 30 15 26 29 30
U3_RC3 U3_RC3 U3_RC2 U3_RC2 RC0 RC0 RC7 RC7
15 16 8 13 15 16 31 32 16 25 31 32
U3_RC6 U3_RC6 U3_RB5 U3_RB5 RC1 RC1 RC6 RC6
17 18 9 12 17 18 33 34 17 24 33 34
U3_RC7 U3_RC7 U3_RB4 U3_RB4 RC2 RC2 RC5 RC5
SGND 19 20 10 11 19 20 35 36 18 23 35 36
U3_RB7 U3_RB7 U3_RB6 U3_RB6 RC3 RC3 RC4 RC4
37 38 19 22 37 38
RD0 RD0 RD3 RD3
J19 110-91-320-41-001 J20 39 40 20 21 39 40
RD1 RD1 RD2 RD2
J21 110-93-640-41-001050 J23
PICDEM™ LAB II DEVELOPMENT BOARD SCHEMATIC 2
VDD4
SGND SGND
C23 C24 C25
0.1uF 0.1uF 0.1uF
Drawn By:
25V 25V 25V
0603 0603 0603
219-0544
Engineer:
D 219-0544 D
1 2 3 4 5 6