Microchip Technology dsPICDEM SMPS Buck Development Board User guide

dsPICDEM™ SMPS Buck
Development Board
User’s Guide
© 2006 Microchip Technology Inc. DS70181A
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, Accuron, dsPIC, K
EELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, SEEVAL, SmartSensor 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, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active Thermistor, Mindi, MiWi, MPASM, MPLIB, MPLINK, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, 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.
© 2006, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona, Gresham, Oregon and Mountain View, California. The Company’s quality system processes and procedures are for its PIC 8-bit MCUs, KEELOQ microperipherals, no nvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
®
code hopping devices, Serial EEPROMs,
DS70181A-page ii © 2006 Microchip Technology Inc.
®
dsPICDEM™ SMPS BUCK
DEVELOPMENT BOARD
USER’S GUIDE
Table of Contents
Preface ........................................................................................................................... 1
Chapter 1. Introduction
1.1 Overview ........................................................................................................ 7
1.2 dsPICDEM™ SMPS Buck Development Board Kit ........................................ 8
1.3 dsPICDEM™ SMPS Buck Development Board Features .............................. 8
Chapter 2. Hardware Overview
2.1 Connectors ................................................................................................... 11
2.2 User Interface Hardware .............................................................................. 14
2.3 Program or Debug Selection Switch (SW2) ................................................. 17
Chapter 3. Using the dsPIC30F2020 Device
3.1 Tutorial Overview ......................................................................................... 19
3.2 Creating the Project ...................................................................................... 19
3.3 Building the Code ......................................................................................... 26
3.4 Programming the Chip ................................................................................. 28
3.5 Debugging the Code .................................................................................... 33
Chapter 4. Demonstration Program Operation
4.1 Demonstration Program ............................................................................... 37
4.2 Demonstration Code .................................................................................... 39
4.3 Other Code Examples .................................................................................. 40
Appendix A. Schematic and Layouts
Index ............................................................................................................................. 45
Worldwide Sales and Service .................................................................................... 46
© 2006 Microchip Technology Inc. DS70181A-page iii
dsPICDEM™ SMPS Buck Development Board
NOTES:
DS70181A-page iv © 2006 Microchip Technology Inc.
dsPICDEM™ SMPS BUCK
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. 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 on-line help files.
®
IDE on-line help.
This document contains general information that is useful to know before using the dsPICDEM™ SMPS Buck Development Board.
Items discussed in this preface include:
• About this Guide
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
• Customer Support
• Document Revision History
ABOUT THIS GUIDE
This document describes how to use the dsPICDEM™ SMPS Buck Development Board development tool. The manual layout is as follows:
Chapter 1. “Introduction” – This chapter introduces the dsPICDEM™ SMPS Buck Development Board and provides a brief descriptions of the hardware.
Chapter 2. “Hardware Overview” – This chapter describes the dsPICDEM™ SMPS Buck Development Board hardware.
Chapter 3. “Using the dsPIC30F2020 Device” – This chapter goes through a basic step by step process for getting your dsPICDEM™ SMPS Buck Develop­ment Board up and running with the MPLAB a dsPIC30F2020 device.
Chapter 4. “Demonstration Program Operation” – This chapter describes the operation of the dsPICDEM™ SMPS Buck Development Board.
Appendix A. “Schematic and Layouts” – This section illustrates the dsPICDEM™ SMPS Buck Development Board layout and provides hardware schematic diagrams.
®
In-Circuit Debugger 2 (ICD 2) using
© 2006 Microchip Technology Inc. DS70181A-page 1
dsPICDEM™ SMPS Buck Development Board
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)
{ ... }
DS70181A-page 2 © 2006 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 dsPICDEM™ SMPS Buck Development Board. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources.
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.
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
Preface
© 2006 Microchip Technology Inc. DS70181A-page 3
dsPICDEM™ SMPS Buck Development Board
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 MPLAB C18 and MPLAB C30 C compilers; MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object linkers; and MPLIB™ and MPLAB LIB30 object librarians.
Emulators – The latest information on Microchip in-circuit emulators.This includes the MPLAB ICE 2000 and MPLAB ICE 4000.
In-Circuit Debuggers – The latest information on the Microchip in-circuit debugger, MPLAB ICD 2.
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 and PRO MATE Plus and PICkit
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
®
1 development programmers.
II device programmers and the PICSTART®
DS70181A-page 4 © 2006 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
Preface
© 2006 Microchip Technology Inc. DS70181A-page 5
dsPICDEM™ SMPS Buck Development Board
DOCUMENT REVISION HISTORY
Revision A (October 2006)
• Initial Release of this Document.
DS70181A-page 6 © 2006 Microchip Technology Inc.
Modern power supplies are becoming smaller, more efficient, more flexible and less costly. These desirable enhancements have come about as digital signal controllers have been incorporated into Switched Mode Power Supply (SMPS) designs. Buck converters are used when the desired output voltage is smaller than the input voltage.
This chapter introduces and provides an overview of the dsPICDEM™ SMPS Buck Development Board. Topics covered include:
•Overview
• dsPICDEM™ SMPS Buck Development Board Kit
• dsPICDEM™ SMPS Buck Development Board Features

1.1 OVERVIEW

Figure 1-1 is a block diagram of the dsPICDEM™ SMPS Buck Development Board, A dsPIC30F2020 DSC controls two independent DC/DC synchronous buck converters, providing closed-loop Proportional, Integral, Derivative (PID) control in software to maintain desired output voltage levels. The dsPIC sary memory and peripherals for A/D conversion, PWM generation and general purpose I/O, precluding the need to perform these functions in external circuitry.
dsPICDEM™ SMPS BUCK
DEVELOPMENT BOARD

Chapter 1. Introduction

®
DSC device provides the neces-
USER’S GUIDE

FIGURE 1-1: SYNCHRONOUS BUCK CONVERTER BLOCK DIAGRAM

LOADBUCK CONVERTER 1
IN
V
Communication
AN4
dsPIC30F2020
AN0
AN1
OC1
AN2
AN3
V
DD
PWM1H PWM1L
I1
V1
Vg
PWM2H
PWM2L
I2
V2
VIN
I1
V1
VG
BUCK CONVERTER 2
VIN
I2
V2
VOUT1
VOUT2
© 2006 Microchip Technology Inc. DS70181A-page 7
dsPICDEM™ SMPS Buck Development Board
dsPIC DSC SMPS devices are specifically designed to provide low-cost, efficient con­trol of a wide range of power supply topologies. Their specialized peripherals facilitate closed-loop feedback control of switched mode power supplies while also providing communications for remote monitoring and supervisory control.
The dsPICDEM™ SMPS Buck Development Board aids in rapid development of mul­tiple buck converters using dsPIC30F1010/2020 Digital Signal Controllers. The dsPIC30F1010/2020 devices offer these features and capabilities:
• Integrated program and data memory on a single chip
• Ultra fast interrupt response time and hardware interrupt priority logic
• 2000 ksps, on-chip ADC with four dedicated sample/hold circuits for multiple loop control
• Four independent, high-resolution PWM generators specially designed to support different power topology
• Four analog comparators for system protection
• On-chip system communications (I
• On-chip RC oscillator for lower system cost
• High-current sink/source I/O pins: 25 mA/25mA
• 30 MIPS performance CPU

1.2 dsPICDEM™ SMPS BUCK DEVELOPMENT BOARD KIT

2
C/SPI/UART)
The dsPICDEM™ SMPS Buck Development Board kit contains these items:
• dsPICDEM™ SMPS Buck Development Board
• dsPICDEM™ SMPS Buck Development Board CD containing example code and relevant documentation

1.3 dsPICDEM™ SMPS BUCK DEVELOPMENT BOARD FEATURES

The dsPICDEM™ SMPS Buck Development Board incorporates these features:

1.3.1 Power Stages

• Two synchronous buck converter power stages
• Voltage/current measurement for digital control of buck converters
• In-rush current limiting
• Switchable 5Ω/5W resistive load on VOUT1
• Buck Converter 1 output (VOUT1) on J1 connector for external loading
• Buck Converter 2 output (VOUT2) on J2 connector for external loading

1.3.2 Input/Output Controls

• Three 5 kΩ Potentiometers (R29,R30 and R35)
• Two push button switches (S2 and S4)
• Master Clear push button switch (S3)
• LED indicator (LED3)
DS70181A-page 8 © 2006 Microchip Technology Inc.
Introduction

1.3.3 Development Board Power

• Auxiliary power input (P1and P2) – 7V to 15V (9V nominal)
• 9 volt power input (J2)
Note: This power input is compatible with the 9 volt power supply that is part of
the MPLAB ICD 2 In-Circuit Debugger (DV164007).
• LED power-on indicator (LED1)
• On-board 5V DC, low-dropout regulator

1.3.4 Communication Ports

• One RS232 port (J6)
• MPLAB ICD 2 programming connector (J5)
• SW2 selection of programming interface to the MPLAB ICD 2 Debugger/Programmer
© 2006 Microchip Technology Inc. DS70181A-page 9
dsPICDEM™ SMPS Buck Development Board
NOTES:
DS70181A-page 10 © 2006 Microchip Technology Inc.

Chapter 2. Hardware Overview

This chapter describes the dsPICDEM™ SMPS Buck Development Board hardware elements and identifies the hardware components. The topics covered include:
• Connectors
• User Interface Hardware
• Program or Debug Selection Switch (SW2)

2.1 CONNECTORS

Figure 2-1 shows the hardware connection (MPLAB ICD 2 and power supply) to the dsPICDEM™ SMPS Buck Development Board.
dsPICDEM™ SMPS BUCK
DEVELOPMENT BOARD
USER’S GUIDE
FIGURE 2-1: dsPICDEM™ SMPS BUCK DEVELOPMENT BOARD
CONNECTED TO MPLAB
Expansion Header
6
®
ICD 2 AND POWER SUPPLY
ICD Connector
3
RS232 Connector
VOUT Connectors
5
4
VOUT2
VOUT1
Input Power Connector
1
2

TABLE 2-1: BUCK CONVERTER BOARD CONNECTORS

No Hardware Elements
1 Input Power Connector (J2) 2 RS232 connector (J6) 3 Programming/debugging connector (J5) 4 VOUT1 Connector (J1) 5 VOUT2 Connector (J3) 6 Expansion Header (J7)
© 2006 Microchip Technology Inc. DS70181A-page 11
Loading...
+ 35 hidden pages