F1 LV Evaluation Platform for
®
Microcontrollers
Enhanced PIC
User’s Guide
2011 Microchip Technology Inc.
DS41614A
Note the following details of the code protection feature on Microchip devices:
•
•
•
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
•
•
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and 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.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
EE
L
OQ
, K
EE
L
OQ
logo, MPLAB, PIC, PICmicro, PICSTART,
PIC
32
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, chipKIT,
chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net,
dsPICworks, dsSPEAK, ECAN, ECONOMONITOR,
FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP,
Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB,
MPLINK, mTouch, Omniscient Code Generation, PICC,
PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE,
rfLAB, Select Mode, Total Endurance, TSHARC,
UniWinDriver, 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.
© 2011, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-61341-776-8
Microchip received ISO/TS-16949:2009 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, K
EE
L
OQ
®
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.
DS41614A-page 2
2011 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM
USER’S GUIDE
Table of Contents
Chapter 1. F1 LV Evaluation Platform Overview
1.1
1.2
1.3
Introduction ............................................................................................. 11
Platform Contents ................................................................................... 11
Hardware Features ................................................................................. 11
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.7
1.3.8
1.3.9
1.3.10
1.3.11
1.3.12
PIC16LF1947 ........................................................................................ 11
MCP9800 I
2
C™ Temperature Sensor ................................................... 11
PICkit™ 3 Programming/Debug Header ............................................... 12
MCP2200 USB to Serial Converter ....................................................... 12
Two Push Buttons, One Potentiometer, 7 LEDs ................................... 12
One Custom LCD .................................................................................. 12
20-pin Add-on Connector ...................................................................... 12
Current Monitoring Connector ............................................................... 12
Generous Prototyping Area ................................................................... 12
MCP1640 Synchronous Boost Regulator .............................................. 12
MCP1703 LDO Regulator ...................................................................... 12
User Selectable Power Sources ............................................................ 13
Chapter 2. Getting Started
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
Introduction ............................................................................................. 15
Powering the F1 LV Evaluation Platform ................................................ 16
Powering with PICkit™ 3 ........................................................................ 16
Powering from External Power Supply ................................................... 17
Powering with the ADD-on Expansion Header J3 .................................. 18
Powering with a AAA Battery .................................................................. 18
Powering with a USB Cable ................................................................... 19
Default Firmware .................................................................................... 19
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
Blinking LEDs ........................................................................................ 19
Measuring the Ambient Temperature .................................................... 19
Add-on Motor Expansion ....................................................................... 20
LCD Display ........................................................................................... 20
User Interface ........................................................................................ 20
Chapter 3. Programming the F1 LV Evaluation Platform
3.1
3.2
3.3
4.1
4.2
4.3
4.4
Introduction ............................................................................................. 21
Programming/Development Tool Support .............................................. 21
Hardware Resources .............................................................................. 22
Introduction ............................................................................................. 25
Service Drivers ....................................................................................... 25
Combined Demo ..................................................................................... 25
Motor Control GUI Application ................................................................ 25
Chapter 4. Demo Code
2011 Microchip Technology Inc.
DS41614A-page 3
F1 LV Evaluation Platform User’s Guide
4.5
4.6
4.7
4.8
5.1
5.2
5.3
5.4
5.5
5.6
BLDC Demo ........................................................................................... 25
BDC Demo ............................................................................................. 26
Unipolar Stepper Demo .......................................................................... 26
Bipolar Stepper Demo ............................................................................ 26
Introduction ............................................................................................. 27
I
2
C™ Driver ............................................................................................ 27
MCP9800 Driver ..................................................................................... 27
RTCC Driver ........................................................................................... 27
LCD Driver .............................................................................................. 27
Using the I
2
C™ Driver ............................................................................ 28
5.6.1
5.6.2
Chapter 5. Hardware Libraries and Drivers
I
2
C Data Structures ................................................................................28
I
2
C Function Interface ............................................................................29
LCD Data Structures ..............................................................................30
LCD Function Interface ..........................................................................31
LCD Segment Definitions .......................................................................32
RTCC Function Interface .......................................................................33
5.7
Using the LCD driver .............................................................................. 30
5.7.1
5.7.2
5.7.3
5.8.1
5.9.1
5.8
5.9
Using the RTCC Driver ........................................................................... 33
Using the MCP9800 Driver ..................................................................... 34
MCP9800 Function Interface .................................................................34
Chapter 6. Troubleshooting
6.1
6.2
Introduction ............................................................................................. 35
Common Problems ................................................................................. 35
6.2.1
6.2.2
The board will not power up ...................................................................35
LCD is blank, but everything else works ................................................35
Chapter 7. Schematics
7.1
Introduction ............................................................................................ 37
7.1.1
7.1.2
7.1.3
7.1.4
F1 LV Evaluation Platform Schematic (1 of 4)
F1 LV Evaluation Platform Schematic (2 of 4)
F1 LV Evaluation Platform Schematic (3 of 4)
F1 LV Evaluation Platform Schematic (4 of 4)
.......................................38
.......................................39
.......................................40
.......................................41
DS41614A-page 4
2011 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM
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
F1 LV Evaluation Platform User’s Guide. Items discussed in this chapter include:
•
•
•
•
•
•
•
•
Document Layout
Conventions Used in this Guide
Warranty Registration
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 F1 LV Evaluation Platform User’s Guide as a
development tool to emulate and debug firmware on a target board. The manual layout
is as follows:
•
•
•
•
•
•
•
Chapter 1. “F1 LV Evaluation Platform Overview”
Chapter 2. “Getting Started”
Chapter 3. “Programming the F1 LV Evaluation Platform”
Chapter 4. “Demo Code”
Chapter 5. “Hardware Libraries and Drivers”
Chapter 6. “Troubleshooting”
Chapter 7. “Schematics”
2011 Microchip Technology Inc.
DS41614A-page 5