Microchip Technology F1 LV Evaluation Platform for Enhanced PIC Microcontrollers User guide

F1 LV Evaluation Platform for
Enhanced PIC® Microcontrollers
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
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
32
PIC
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 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.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
DS41614A-page 2 2011 Microchip Technology Inc.
F1 LV EVALUATION PLATFORM
Table of Contents
Chapter 1. F1 LV Evaluation Platform Overview
1.1 Introduction ............................................................................................. 11
1.2 Platform Contents ................................................................................... 11
1.3 Hardware Features ................................................................................. 11
1.3.1 PIC16LF1947 ........................................................................................ 11
1.3.2 MCP9800 I
1.3.3 PICkit™ 3 Programming/Debug Header ............................................... 12
1.3.4 MCP2200 USB to Serial Converter ....................................................... 12
1.3.5 Two Push Buttons, One Potentiometer, 7 LEDs ................................... 12
1.3.6 One Custom LCD .................................................................................. 12
1.3.7 20-pin Add-on Connector ...................................................................... 12
1.3.8 Current Monitoring Connector ............................................................... 12
1.3.9 Generous Prototyping Area ................................................................... 12
1.3.10 MCP1640 Synchronous Boost Regulator .............................................. 12
1.3.11 MCP1703 LDO Regulator ...................................................................... 12
1.3.12 User Selectable Power Sources ............................................................ 13
2
C™ Temperature Sensor ................................................... 11
USER’S GUIDE
Chapter 2. Getting Started
2.1 Introduction ............................................................................................. 15
2.2 Powering the F1 LV Evaluation Platform ................................................ 16
2.3 Powering with PICkit™ 3 ........................................................................ 16
2.4 Powering from External Power Supply ................................................... 17
2.5 Powering with the ADD-on Expansion Header J3 .................................. 18
2.6 Powering with a AAA Battery .................................................................. 18
2.7 Powering with a USB Cable ................................................................... 19
2.8 Default Firmware .................................................................................... 19
2.8.1 Blinking LEDs ........................................................................................ 19
2.8.2 Measuring the Ambient Temperature .................................................... 19
2.8.3 Add-on Motor Expansion ....................................................................... 20
2.8.4 LCD Display ........................................................................................... 20
2.8.5 User Interface ........................................................................................ 20
Chapter 3. Programming the F1 LV Evaluation Platform
3.1 Introduction ............................................................................................. 21
3.2 Programming/Development Tool Support .............................................. 21
3.3 Hardware Resources .............................................................................. 22
Chapter 4. Demo Code
4.1 Introduction ............................................................................................. 25
4.2 Service Drivers ....................................................................................... 25
4.3 Combined Demo ..................................................................................... 25
4.4 Motor Control GUI Application ................................................................ 25
2011 Microchip Technology Inc. DS41614A-page 3
F1 LV Evaluation Platform User’s Guide
4.5 BLDC Demo ........................................................................................... 25
4.6 BDC Demo ............................................................................................. 26
4.7 Unipolar Stepper Demo .......................................................................... 26
4.8 Bipolar Stepper Demo ............................................................................ 26
Chapter 5. Hardware Libraries and Drivers
5.1 Introduction ............................................................................................. 27
5.2 I
5.3 MCP9800 Driver ..................................................................................... 27
5.4 RTCC Driver ........................................................................................... 27
5.5 LCD Driver .............................................................................................. 27
5.6 Using the I
5.7 Using the LCD driver .............................................................................. 30
5.8 Using the RTCC Driver ........................................................................... 33
5.9 Using the MCP9800 Driver ..................................................................... 34
2
C™ Driver ............................................................................................ 27
2
C™ Driver ............................................................................ 28
5.6.1 I2C Data Structures ................................................................................28
5.6.2 I
5.7.1 LCD Data Structures ..............................................................................30
5.7.2 LCD Function Interface ..........................................................................31
5.7.3 LCD Segment Definitions .......................................................................32
5.8.1 RTCC Function Interface .......................................................................33
5.9.1 MCP9800 Function Interface .................................................................34
2
C Function Interface ............................................................................29
Chapter 6. Troubleshooting
6.1 Introduction ............................................................................................. 35
6.2 Common Problems ................................................................................. 35
6.2.1 The board will not power up ...................................................................35
6.2.2 LCD is blank, but everything else works ................................................35
Chapter 7. Schematics
7.1 Introduction ............................................................................................ 37
7.1.1 F1 LV Evaluation Platform Schematic (1 of 4) .......................................38
7.1.2 F1 LV Evaluation Platform Schematic (2 of 4) .......................................39
7.1.3 F1 LV Evaluation Platform Schematic (3 of 4) .......................................40
7.1.4 F1 LV Evaluation Platform Schematic (4 of 4) .......................................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 Select the Help menu, and then Topics to open a list of available online help files.
®
IDE online help.
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
F1 LV Evaluation Platform User’s Guide
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB
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
Underlined, italic text with right angle bracket
Bold characters A dialog button Click OK
N‘Rnnnn A number in verilog format,
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Italic Courier New A variable argument file.o, where file can be
Square brackets [ ] Optional arguments mcc18 [options] file
Curly brackets and pipe character: { | }
Ellipses... Replaces repeated text var_name [,
A menu path File>Save
A tab Click the Power tab
where N is the total number of digits, R is the radix and n is a digit.
Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’
Choice of mutually exclusive arguments; an OR selection
Represents code supplied by user
®
IDE User’s Guide
“Save project before build”
4‘b0010, 2‘hF1
any valid filename
[options]
errorlevel {0|1}
var_name...] void main (void)
{ ... }
DS41614A-page 6 2011 Microchip Technology Inc.
WARRANTY REGISTRATION
Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates. Interim software releases are available at the Microchip web site.
RECOMMENDED READING
This user’s guide describes how to use the F1 LV Evaluation Platform. Other useful documents are listed below. The following Microchip documents are available and rec­ommended as supplemental reference resources.
Readme for F1 LV Evaluation Platform User’s Guide
For the latest information on using F1 LV Evaluation Platform User’s Guide, read the “Readme for F1 LV Evaluation Platform User’s Guide.txt” file (an ASCII text file) in the Readmes subdirectory of the MPLAB Readme file contains update information and known issues that may not be included in this user’s guide.
Readme Files
For the latest information on using other tools, read the tool-specific Readme files in the Readmes subdirectory of the MPLAB IDE installation directory. The Readme files contain update information and known issues that may not be included in this user’s guide.
Preface
®
IDE installation directory. The
2011 Microchip Technology Inc. DS41614A-page 7
F1 LV Evaluation Platform User’s Guide
THE MICROCHIP WEB SITE
Microchip provides online support via our web site at www.microchip.com/F1LVEval. 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
General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program member listing
Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
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 www.microchip.com, click on Customer 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
tools. These include the HI TECH C pilers; MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object linkers; and MPLIB™ and MPLAB LIB30 object librarians.
In-Circuit Debuggers – The latest information on the Microchip in-circuit
debugger, MPLAB ICD 2, ICD3, PICkit™ 3.
MPLAB
Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager and general editing and debugging features.
Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 device programmers and PICkit™ 3 development programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
®
C16, MPLAB C18 and MPLAB C30 C com-
DS41614A-page 8 2011 Microchip Technology Inc.
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://support.microchip.com
DOCUMENT REVISION HISTORY
Revision A (November 2011)
• Initial Release of this Document.
Preface
2011 Microchip Technology Inc. DS41614A-page 9
F1 LV Evaluation Platform User’s Guide
NOTES:
DS41614A-page 10 2011 Microchip Technology Inc.

Chapter 1. F1 LV Evaluation Platform Overview

1.1 INTRODUCTION

Thank you for choosing the F1 LV Evaluation Platform. This kit allows you to begin development using the PIC16LF1947 microcontroller (MCU).
The PIC16LF1947 is the first in a family of enhanced mid-range microcontrollers. These architectural enhancements allow for more memory and faster computation than that of legacy PIC16 microcontrollers.
The PIC16F1 and PIC12F1 family of microcontrollers are a series of 8-bit microcontrollers derived from the popular PIC16 series of 8-bit PIC The F1 LV derivatives feature an enhanced CPU, support for extended amounts of memory, improved peripherals, and XLP low power. The F1 LV Evaluation Platform allows you to evaluate these features for your application in a simple, low-cost platform.
This chapter introduces the F1 LV Evaluation Platform:
• Platform Contents
• Hardware Features
F1 LV EVALUATION PLATFORM
USER’S GUIDE
®
microcontrollers.

1.2 PLATFORM CONTENTS

The F1 LV Evaluation Platform contains the following items:
1. F1 LV Evaluation Platform Demo Board – www.microchip.com/

1.3 HARDWARE FEATURES

The F1 LV Evaluation Platform has the following hardware features:

1.3.1 PIC16LF1947

The PIC16LF1947 is a 64-pin full-featured device, including:
1. Enhanced PIC16 instruction set
2. 16K words of Flash memory
3. 1K of RAM
4. 256 bytes of EEPROM
5. 2 CCPs and 3 enhanced CCPs
6. MSSP (I
7. Enhanced USART
8. 8- and 16-bit timers
9. 32 MHz internal oscillator
10. Low-power 32 kHz crystal oscillator
11. LCD controller
12. LF Operating Range: 1.8-3.6V
2
C™, SPI)
F1LVEval

1.3.2 MCP9800 I2C™ Temperature Sensor

The MCP9800 is a low-power, I2C temperature sensor with selectable 9 to 12 bits of output resolution.
2011 Microchip Technology Inc. DS41614A-page 11
F1 LV Evaluation Platform User’s Guide

1.3.3 PICkit™ 3 Programming/Debug Header

The PICkit 3 is a low-cost development tool that allows programming and debugging of the PIC16LF1947 MCU using the PICkit ICSP™ header.

1.3.4 MCP2200 USB to Serial Converter

The MCP2200, with the associated driver, makes the F1 LV Evaluation platform appear as a serial port when connected to a PC. The demo code includes utilities to control the various add-on boards through this serial interface.

1.3.5 Two Push Buttons, One Potentiometer, 7 LEDs

Simple applications need the basic user interface elements. Two push buttons, one potentiometer and 4 green LEDs are available for any application. The remaining three LEDs are used as indicators, a red LED is used to indicate the board is powered, the remaining two LEDs are green and indicate RX/TX communication through the USB Serial Converter.

1.3.6 One Custom LCD

The LCD glass supplied on this board is a Microchip custom display with icons for a battery indicator, 4 large numerical digits, 2 small numerical digits, adjustable decimal point, colon for time keeping, 4 function mode (Fx) indicators, 8 segment bar, a three-segment battery power indicator and 1 custom Microchip symbol. The PIC16LF1947 makes controlling the LCD very simple.

1.3.7 20-pin Add-on Connector

This connector expands the F1 LV Evaluation Board with optional add-on boards. Currently, there are 4 motor control add-ons planned or in production. The PIC16LF1947 has complete control of 3 phases, so other 1, 2, or 3-phase motor topologies are supported.

1.3.8 Current Monitoring Connector

To demonstrate the Extreme Low Power (XLP) features of the PIC16LF1947, a precision ammeter can be connected to the current monitoring connector. This allows your application to be easily optimized for the lowest possible current.

1.3.9 Generous Prototyping Area

Our circuits are not your circuits. A prototyping area has been provided to extend the functionality of this demo board to demonstrate the utility of the PIC16LF1947 in your application.

1.3.10 MCP1640 Synchronous Boost Regulator

The MCP1640 is a compact, high-efficiency, fixed frequency, synchronous step-up DC-DC converter. Through the use of this component, the F1 LV Evaluation board has the option of boosting an AAA 1.8V battery to 3.3V, which is then used to power the board and supporting circuitry.

1.3.11 MCP1703 LDO Regulator

The MCP1703 is a low-dropout voltage regulator with a 250 mA maximum output. Through the use of this component, the user has the option of powering the F1 LV Evaluation board through the USB Serial Converter connector. The USB supplies 5V, and the MCP1703 reduces this to the operating voltage of 3.3V.
DS41614A-page 12 2011 Microchip Technology Inc.
F1 LV Evaluation Platform Overview

1.3.12 User Selectable Power Sources

The F1 LV Evaluation board operates at 3.3V and comes with a flexable range of powering options.
• J5 – (EXT SUPP) The user can power the board from a external power supply connected to the +/- headers.
• J6 – (EXP PWR) The user can power the board from any Add-on board through the expansion connector.
• J7 – (AAA BATT) The user can power the board by inserting a single AAA battery into B1 battery clamp.
• J8 – (USB PWR) The user can power the board by connecting a USB cable to J2 USB SERIAL CONV header.
2011 Microchip Technology Inc. DS41614A-page 13
F1 LV Evaluation Platform User’s Guide
NOTES:
DS41614A-page 14 2011 Microchip Technology Inc.
Loading...
+ 30 hidden pages