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 Digit al Millennium Copyright Act. If suc h a c t s
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 t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our 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 supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es 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, SmartT el, Total
Endurance, UNI/O, WiperLock and ZENA are trademarks of
Microchip Technology I ncorporat ed 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.
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
®
8-bit MCUs, KEELOQ
PIC
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.
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.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
dsPICDEM™ 1.1 Plus Development Board. Items discussed in this chapter 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™ 1.1 Plus Development Board as
a development tool to emulate and debug firmware on a target board. The manual
layout is as follows:
• Chapter 1: Introduction – This chapter introduces the dsPICDEM™ 1.1 Plus
Development Board and provides a brief description of the hardware.
• Chapter 2: Using dsPIC30F Devices – This chapter goes through a basic
step-by-step process for getting your dsPICDEM™ 1.1 Plus Development Board
up and running with the MPLAB
devices.
• Chapter 3: Demonstration Program Operation – This chapter presents a
detailed description of the operational functionality of the sample code, which is
preprogrammed into the dsPIC30F device.
• Chapter 4. Using dsPIC33F/PIC24H Devices – This chapter goes through a
basic step-by-step process for getting your dsPICDEM™ 1.1 Plus Development
Board up and running with the MPLAB
• Chapter 5: dsPICDEM™ 1.1 Plus Development Board Hardware – This chapter presents the features of the dsPICDEM™ 1.1 Plus Development Board in
more detail.
• Appendix A: Hardware Drawings and Schematics – This Appendix illustrates
the dsPICDEM™ 1.1 Plus Development Board layout and hardware schematic
diagrams.
• Appendix B: LCD Controller Specification – This section pr esent s the 1 22 x 32
Graphics LCD Controller Interface Specifications.
• Index – This section provides cross-reference listing of terms, features and
sections of this document.
• Worldwide Sales and Service – A listing of Microchip sales and service locations
and telephone numbers worldwide.
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™ 1.1 Plus Development Board.
Other useful documents are listed below:
dsPIC30F Family Reference Manual (DS70 046)
Consult this document for detailed information on the dsPIC30F device operation. The
manual explains the operation of the dsPIC30F MCU family architecture and peripheral
modules but does not cover the specifics of each device. Refer to the appropriate
device data sheet, mentioned below, for device-specific information.
This manual is a software developer’s reference for the dsPIC30F/33F 16-bit MCU
device families. This manual describes the instruction set in detail and also provides
general information to assist the user in developing software for the dsPIC30F MCU
family.
dsPIC30F Family Overview (DS70043)
This document provides an overview of the features and functionality of the dsPIC
DSC product family. It helps determine how the dsPIC 16-bit Digital Signal Controller
Family fits a specific product application. For detailed information about any of the
functionality, refer to the “dsPIC30F Family Reference Manual” (DS70 046 ).
PIC24H Family Data Sheet (DS70175)
This data sheet summarizes the features of the PIC24H family of devices. It provides
essential information needed to develop software for these devices.
dsPIC33F Family Data Sheet (DS70165)
This data sheet summarizes the features of the dsPIC33F family of devices. It provides
essential information needed to develop software for these devices.
MPLAB
This document details Microchip Technology’s language tools for dsPIC DSC devices
based on GNU technology. The language tools discussed are:
• MPLAB ASM30 Assembler
• MPLAB LINK30 Linker
• MPLAB LIB30 Archiver/Librarian
• Other Utilities
MPLAB
The purpose of this document is to help you use Microchip’s MPLAB C30 C compiler
for dsPIC
guage tool, based on source code from the Free Software Foundation (FSF). For more
information about the FSF, see www.fsf.org.
Other GNU language tools available from Microchip are:
• MPLAB ASM30 Assembler
• MPLAB LINK30 Linker
• MPLAB LIB30 Librarian/Archiver
®
ASM30, MPLAB® LINK30 and Utilities User’s Guide (DS51317)
®
C30 C Compiler User’s Guide (DS51284)
®
DSC devices to develop your application. MPLAB C30 is a GNU-based lan-
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 listin g
• 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 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®
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 D (October 2006)
This revision reflects an upgrade to the dsPICDEM™ 1.1 Plus Development Board to
allow it to accommodate dsPIC30F, dsPIC33F, PIC24H and PIC24F devices.
• Changed board name to dsPICDEM™ 1.1 Plus Development Board.
• Modified power supply circuits to accommodate both 3.3 V and 5V devices.
• Added tutorial and code examples for using the dsPICDEM™ 1.1 Plus Development Board with dsPIC33F and PIC24H/F devices (see Chapter 4. “Using
dsPIC33F and PIC24H/24F Devices”).
Preface
Revision C (September 2005)
• Last Release of this Document.
• Previous releases contained Advance Information that was updated in
Revision C.
The dsPICDEM™ 1.1 Plus Development Board Kit serves as a development and evaluation tool for dsPIC30F/33F High Performance Digital Signal Controllers and
PIC24H/24F PIC
1.2HIGHLIGHTS
This chapter discusses:
• dsPICDEM™ 1.1 Plus Development Board Kit
• dsPICDEM™ 1.1 Plus Development Board Features
• Supported Plug-In Modules
• Running the
1.3dsPICDEM™ 1.1 PLUS DEVELOPMENT BOA RD KIT
®
microcontrollers.
dsPICDEM™ 1.1 Demonstration Program
USER’S GUIDE
The dsPICDEM™ 1.1 Plus Development Board Kit contains the following items:
• The dsPICDEM™ 1.1 Plus Printed Circuit Board (Figure 1-1)
1.6RUNNING THE dsPICDEM™ 1.1 PLUS DEMONSTRATION PROGRAM
The dsPICDEM™ 1.1 Plus Development Board is supplied with a pre-loaded demonstration program that exercises principal CPU functions and peripheral options that
interact with typical user application programs.
When you apply power to the dsPICDEM™ 1.1 Plus Development Board, the LCD
menu displays these demonstration functions:
• Data Acquisition Display
• Digital Signal Processing (DSP) Operations
• Dual Tone Multi-Frequency (DTMF) Generation
Switches SW2-SW4 select one of these three choices. Each choice offers a submenu,
which provides for additional options using switches SW1-SW4.
Refer to Chapter 3. “dsPIC30F Demonstration Program Operation” for full details
This chapter is a self-paced tutorial to get you started using the dsPICDEM™ 1.1 Plus
Development Board with dsPIC30F devices. The tutorial demonstrates the main features of MPLAB IDE Integrated Development Environment and the MPLAB ICD 2
In-Circuit Debugger as they are used with the dsPICDEM™ 1.1 Plus Development
Board. Upon completing this tutorial, you should be able to:
• Create a project using the Project Wizard.
• Assemble and link the code and set the Configuration bits.
• Set up MPLAB IDE to use the MPLAB ICD 2 In-Circuit Debugger.
• Program the chip with the MPLAB ICD 2.
• View the code execution in program memory and source code.
• View registers in a Watch window.
• Set a breakpoint and make the code halt at a chosen location.
• Use the function keys to Reset, Run, Halt and Single Step the code.
dsPICDEM™ 1.1 PLUS
DEVELOPMENT BOARD
USER’S GUIDE
2.2HIGHLIGHTS
Items discussed in this chapter include:
• Tutorial Overview
• Creating the Project
• Building the Code
• Programming the Chip
• Debugging the Code
2.3TUTORIAL OVERVIEW
The tutorial program in Tut6014a.s (included with the CD-ROM) is written in
assembly code. This program displays text on the LCD and flashes an LED. The
source file is used with a linker script file (p30f6014a.gld) and an include file
(p30f6014a.inc) to form a comple te proje ct. The tutoria l is a si mple pr oject th at uses
a single source code file. More complex projects might use multiple assembler and
compiler source files as well as library files and precompiled object files. For simplicity ,
this tutorial uses only one source file.
The first step is to create a project and a workspace in MPLAB IDE. Usually, you will
have one project in one workspace.
Note:These instructions presume the use of MPLAB 7.20 or newer.
A project contains the files needed to build an application (source code, linker script
files, etc.) along with their associations to various build tools and build options.
A workspace contains one or more projects and information on the selected device,
debug tool and/or programmer, open windows and their location and other IDE
configuration settings.
MPLAB IDE contains a Project Wizard to help create new projects. Before starting,
create a folder for the project files for this tutorial (C:\Tutorial is assumed in the
instructions that follow). From the dsPICDEM 1_1 Plus Development Board code\Tutorial Code folder on the dsPICDEM™ 1.1 Plus Development Kit CD,
copy the Tut6014a.s file into the C:\Tutorial fold er.
Note:All files copied from the CD are read only. If the file needs to be edited, the
attributes will need to be changed.
2.4.1Select a Device
1. Start MPLAB IDE.
2. Close any workspace that might be open (File>Close Workspace
3. From the Project
4. From the Welcome screen, click Next> to display the Project Wizard Step One
dialog (see Figure 2-1).
FIGURE 2-1:PROJECT WIZARD, STEP 1, SELECT A DEVICE
A project and workspace has now been created in MPLAB IDE. MyProject.mcw is
the workspace file and MyProject.mcp is the project file. Double click the
Tut6014A.s file in the project window to open the file. MPLAB IDE should now look
similar to Fi gu r e 2-6.
In this project, building the code consists of assembling the Tut6014A.s file to create
an object file, Tut6014A.o, and then linking the object file to create the
Tut6014A.hex and Tut6014A.cof output files. The .hex file contains the data necessary to program the device and the .cof file contains additional information that lets
you debug at the source code level.
Before building, there are settings required to tell MPLAB IDE where to find the include
files and to reserve space for the extra debug code when the MPLAB ICD 2 is used.
The following line is near the top of the Tut6014A.s file:
.include "p30f6014A.inc"
This line causes a standard include file to be used. Microchip provides these files with
all the Special Function Register (SFR) labels already defined for convenience.
To build the code, select Build Option s>Project
Options dialog displays, as shown in Figure 2-7.
FIGURE 2-7:BUILD OPTIONS
Using dsPIC30F Devices
from the Project> menu. The Build
Browse to the location of the
assembler Include folder.