Note the following details of the code protection feature on Microchip devices:
YSTEM
CERTIFIED BY DNV
== ISO/TS 16949==
•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,
FlashFlex, K
PICSTART, PIC
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,
MTP, SEEVAL and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of
Microchip Technology Inc. in other countries.
Analog-for-the-Digital Age, Application Maestro, BodyCom,
chipKIT, chipKIT logo, CodeGuard, dsPICDEM,
dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPF, MPLAB
Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, SQI, Serial Quad I/O,
Total Endurance, TSHARC, UniWinDriver, WiperLock, ZENA
and Z-Scale 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.
GestIC and ULPP are registered trademarks of Microchip
Technology Germany II GmbH & Co. KG, a subsidiary of
Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their
respective companies.
DS40001671B-page 2 2012-2013 Microchip Technology Inc.
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.
3.3 Center Weighted Variable PWM .................................................................. 39
DS40001671B-page 4 2012-2013 Microchip Technology Inc.
PSMC DESIGNER
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
PSMC Designer. Items discussed in this chapter include:
• Conventions Used in this Guide
• The Microchip Web Site
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This document describes how to use the PSMC Designer. The document is organized
as follows:
Choice of mutually exclusive
arguments; an OR selection
Represents code supplied by
user
“Save project before build”
4‘b0010, 2‘hF1
any valid filename
[options]
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
DS40001671B-page 6 2012-2013 Microchip Technology Inc.
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
• 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
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.
Technical support is available through the web site at:
DS40001671B-page 8 2012-2013 Microchip Technology Inc.
Chapter 1. PSMC Designer Overview
1.1INTRODUCTION
The PSMC peripheral is a sophisticated programmable switch mode controller
intended to operate power conversion applications with little or no software
intervention. The peripheral capabilities range from simple, single channel PWM
generation to multi-channel complementary waveforms with dead bands between
transitions. PWM modes include:
•PWM
• Push-Pull
• Full-bridge
• Push-Pull Full-bridge
• Pulse skipping
• High resolution fixed duty cycle
• 6-step 3-phase operation
Every mode, except the 6-step, has a complementary output mode, which drives at
least two channels that are the complement of each other.
The PSMC also supports various driver and feedback configurations with the following
programmable features:
• Dead band – delays the output drive for a time after the complement of that output
turns off
• Blanking – Suppresses feedback signals for a time after the drive transitions on
and off
• Asynchronous inputs – pulse Start and Stop events can be triggered by external
asynchronous signals in combination with, or independent of, an internal time
base
• Shutdown – immediate safe shutdown driven by an external asynchronous Fault
signal
• Modulation – the PWM can be operated as a carrier and modulated by an
independent input
There are thirty Special Function Registers (SFRs) in the PSMC configuration setup.
Setting all thirty registers with the appropriate values for desired operation can be a
daunting task. The PSMC Designer GUI was created to simplify that effort.
The GUI divides the PSMC into up to eleven major functions. These functions are
shown in relation to each other in block diagram format in the main GUI window.
Clicking on a block opens the control GUI for that function. The user is guided through
the PSMC configuration design by completing signal paths and control options within
each function by selecting switch positions. Entry boxes for times and frequencies
appear within the diagrams where numeric entry is required.
There are two options for transferring the completed PSMC configuration to your
project. One is to copy the code into the clipboard buffer which can then be pasted into
your source code. The other transfer method is to generate an output file that can be
included by reference in your source code. Include files are also the means by which
PSMC configurations are stored for later retrieval by the PSMC designer.
Although a brief description of each function is included at the beginning of each
function section, please refer to the device data sheet for a more detailed description
of the PSMC operation. The sections of this guide are arranged in the same order of
progression that a user would follow when creating a PSMC configuration.
DS40001671B-page 10 2012-2013 Microchip Technology Inc.
Chapter 2. Main PSMC Configuration GUI
2.1INTRODUCTION
Figure 2-1 shows the main PSMC Designer user interface, referred to hereafter as the
main GUI. Here you will see the eleven major functions of the PSMC:
As you move your cursor around the display, you will notice that the cursor shape
changes to a hand whenever it is within the bounds of one of the function blocks.
Clicking on the mouse when the cursor is a hand will open a control GUI for the function
to which the hand is pointing. When you are finished configuring that block you can
either close the associated GUI or leave it open. All functions remain active whether or
not they are visible.
2.3DEVICE SELECTION
Selecting the device is the first step in creating a PSMC configuration. The Device
combination box lists all devices with PSMC peripherals. Make the selection by
scrolling through the list to the desired device. The device selection also configures
controls for all PSMC instances in that device with the proper input and output names
associated with that device.
2.4PSMC SELECTION
Selecting the desired PSMC instance is the second step in creating a PSMC
configuration. Make the selection by scrolling through the list to the desired PSMC
instance. The PSMC selection also configures all other controls with the proper input
and output names associated with that PSMC instance.
2.5PSMC ENABLE
This checkbox in the main GUI enables or disables the currently selected PSMC of the
currently selected device.
2.6INTERRUPT ENABLES
The interrupt enable checkboxes in the main GUI enable or disable the corresponding
bit of the PIEx register for the currently selected PSMC of the currently selected device.
2.6.1Timed Event Interrupt Enable
The timed event enable is the summary enable bit for the timed event interrupts.
2.6.2Auto-Shutdown Interrupt Enable
The auto-shutdown enable is the enable bit for auto-shutdown events.
2.7COMMENTS
The comments section in the lower center of the main GUI is where user comments
about the PSMC configuration can be entered. Each PSMC instance has its own
comment data, which is displayed when that PSMC is selected. Comments entered in
this box are included as comments in the saved file output.
DS40001671B-page 12 2012-2013 Microchip Technology Inc.
2.8COPY AND SHOW BUTTON
The Copy and Show button does two things: It shows all SFR values in the PSMC
instance configuration, and it copies those values to the clipboard. The clipboard format
is consistent with the type selected by the Code Type radio buttons. C and Assembly
are the two options. The clipboard capture can be pasted into your source code,
however, code for only the presently selected PSMC instance is in the clipboard.
Multiple copy and paste operations are required when working with multiple PSMC
instances. A better method for saving multiple PSMC instances of the same device is
the File Save option. Files can be saved in either C or Assembly format (see Save Assy
or Save C).
2.8.1PSMC SFR Displays
The PSMC SFRs are displayed by name and value in the 30 text boxes between the
Copy and Show button and the Paste button. Only the SFRs for the selected PSMC
instance are displayed as indicated by each of the SFR name prefixes.
2.9PASTE BUTTON
The Paste button transfers SFR values of the PSMC instance, from which they were
copied with the Copy and Show button, to the presently selected PSMC instance. In
this manner, one PSMC configuration can be created then quickly copied to other
desired PSMC instances. It is usually easier to make a few changes to a copied
configuration than it is to re-enter the entire configuration for each PSMC instance.
Note that the Paste button will not paste values copied from your source code.
Main PSMC Configuration GUI
2.10CLEAR BUTTON
The Clear button clears all SFRs in the presently selected PSMC instance to zero. All
GUIs of the various functions adjust accordingly.
2.11PULL-DOWN MENU
In the upper left of the main GUI display there is a pull-down menu titled “File”. This
pull-down menu includes the following:
• Save Assy Code
• Save C Code
• Load Code
A file selection dialog will appear when the desired menu item is selected for both
saving and loading code. A comment section, that includes the device number and
clock frequency, is included in the saved code. This is used to reconstruct those parts
of the configuration when the code is loaded back into the designer tool.
2.11.1Save Assy
Selecting the Save Assy code menu option creates an include file containing assembly
configuration code for all PSMCs in the selected device that have been configured. Any
PSMC instance in the selected device that is clear will not be included in the output.
2.11.2Save C
Selecting the Save C code menu option creates an include file containing C
configuration code for all PSMCs in the selected device that have been configured. Any
PSMC instance in the selected device that is clear will not be included in the output.