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 intended through suggestion only
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
No representation or warranty is given and no liability is
assumed by Microchip Technology Incorporated with respect
to the accuracy or use of such information, or infringement of
patents or other intellectual property rights arising from such
use or otherwise. Use of Microchip’s products as critical
components in life support systems is not authorized except
with express written approval by Microchip. No licenses are
conveyed, implicitly or otherwise, under any intellectual
property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE and PowerSmart are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
AmpLab, FilterLab, microID, MXDEV, MXLAB, PICMASTER,
SEEVAL, SmartShunt and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Application Maestro, dsPICDEM, dsPICDEM.net,
dsPICworks, ECAN, ECONOMONITOR, FanSense,
FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP,
ICEPIC, microPort, Migratable Memory, MPASM, MPLIB,
MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICtail,
PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPIC,
Select Mode, SmartSensor, SmartTel and Total Endurance
are trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
Serialized Quick Turn Programming (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 quality system certification for
its worldwide headquarters, design and wafer fabrication facilities in
Chandler and Tempe, Arizona and Mountain View, California in October
2003 . The Company’s quality system processes and procedures are
for its PICmicro
EEPROMs, microperipherals, non-volatile memory and analog
products. In addition, Microchip’s quality system for the design and
manufacture of development systems is ISO 9001:2000 certified.
®
8-bit MCUs, KEELOQ
®
code hopping devices, Serial
DS70099B-page iiAdvance Information 2003 Microchip Technology Inc.
Index .............................................................................................................................65
Worldwide Sales and Service .....................................................................................68
DS70099B-page ivAdvance Information 2003 Microchip Technology Inc.
INTRODUCTION
HIGHLIGHTS
dsPICDEM™ 1.1
DEVELOPMENT BOARD
USER’S GUIDE
Preface
This chapter contains general information about this user’s guide and customer support
that will be useful prior to using the dsPICDEM 1.1 Development Board.
Items discussed in this chapter are:
• About this Guide
• Warranty Registration
• Recommended Reading
• Troubleshooting
• Microchip On-Line Support
• Customer Change Notification Service
• Customer Support
ABOUT THIS GUIDE
This document describes how to use the dsPICDEM 1.1 Development Board. The
manual layout is as follows:
• Chapter 1: Introduction – This chapter introduces the dsPICDEM 1.1
Development Board and provides a brief description of the hardware.
• Chapter 2: Tutorial – This chapter goes through a basic step-by-step process for
getting your dsPICDEM 1.1 Development Board up and running with the MPLAB
In-Circuit Debugger 2 (ICD 2).
• 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: dsPICDEM 1.1 Development Board Hardware – This chapter
presents the features of the dsPICDEM 1.1 Development Board in more detail.
• Appendix A: Hardware Schematics – This Appendix illustrates the
dsPICDEM 1.1 Development Board layout and hardware schematic diagrams.
• Appendix B: LCD Controller Specification – This section presents the 122 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
Italic charactersA variable argument; it can be either a
Interface (Arial font):
Underlined, italic text
with right arrow
Bold charactersA window or dialog button to clickOK, Cancel
Characters in angle
brackets < >
Documents (Arial font):
Italic charactersReferenced booksMPLAB IDE User’s Guide
Choice of mutually exclusive
arguments; an OR selection
Type of data
additional text that is not relevant to
the example
hexadecimal digit
type of data (in lower case characters)
or a specific example (in upper case
characters)
A menu selection from the menu barFile > Save
A key on the keyboard<Tab>, <Ctrl-C>
#define START
c:\autoexec.bat
errorlevel {0|1}
"filename"
list
"list_option...,
[
"list_option"]
0xFFFF, 0x007A
char isascii (char,
ch);
Documentation Updates
All documentation becomes dated, and this user’s guide is no exception. Since the
dsPICDEM 1.1 Development Board User’s Guide and other Microchip tools are
constantly evolving to meet customer needs, some actual dialogs and/or tool
descriptions may differ from those in this document. Please refer to our web site to
obtain the latest documentation available.
Documentation Numbering Conventions
Documents are numbered with a “DS” number. The 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 =The document number.
A=The revision level of the document.
WARRANTY REGISTRATION
Please complete the enclosed Warranty Registration Card and mail it promptly.
Sending in your Warranty Registration Card entitles you to receive new product
updates. Interim software releases are available at the Microchip web site.
DS70099B-page 2Advance Information 2003 Microchip Technology Inc.
RECOMMENDED READING
This user’s guide describes how to use the dsPICDEM 1.1 Development Board. Other
useful documents are listed below:
dsPIC30F Family Reference Manual (DS70046)
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.
dsPIC30F Data Sheet, Motor Control and Power Conversion Family (DS70082)
Consult this document for information regarding the dsPIC30F Motor Control and
Power Conversion devices. Reference information found in this data sheet includes:
• Device memory map
• Device pinout and packaging details
• Device electrical specifications
• List of peripherals included on the device
dsPIC30F Data Sheet, General Purpose and Sensor Families (DS70083)
Consult this document for information regarding the dsPIC30F Sensor and General
Purpose devices. Reference information found in this data sheet includes:
• Device memory map
• Device pinout and packaging details
• Device electrical specifications
• List of peripherals included on the device
dsPIC30F Programmer’s Reference Manual (DS70030)
This manual is a software developer’s reference for the dsPIC30F 16-bit MCU family
of devices. 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, dsPIC High Performance
16-bit Digital Signal Controller (DS70043)
This document provides an overview of the features and functionality of the dsPIC
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 (DS70046).
MPLAB ASM30, MPLAB LINK30 and Utilities User’s Guide (DS51317)
This document details Microchip Technology’s language tools for dsPIC devices based
on GNU technology. The language tools discussed are:
• MPLAB ASM30 Assembler
• MPLAB LINK30 Linker
• MPLAB LIB30 Archiver/Librarian
• Other Utilities
MPLAB C30 C Compiler User’s Guide (DS51284)
The purpose of this document is to help you use Microchip’s MPLAB C30 C compiler
for dsPIC devices to develop your application. MPLAB C30 is a GNU-based language
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
MPLAB IDE Simulator, Editor User’s Guide (DS51025)
Consult this document for more information pertaining to the installation and features
of the MPLAB Integrated Development Environment (IDE) Software.
To obtain any of these documents, contact the nearest Microchip sales location
(see back page) or visit the Microchip web site at: www.microchip.com.
THE MICROCHIP WEB SITE
Microchip provides online support on the Microchip World Wide Web (WWW) site. The
web site is used by Microchip as a means to make files and information easily available
to customers. To view the site, you must have access to the Internet and a web
browser, such as, Netscape Navigator
The Microchip web site is available by using your favorite Internet browser to reach:
http://www.microchip.com
The web site provides a variety of services. Users may download files for the latest
development tools, data sheets, application notes, user’s guides, articles and sample
programs. A variety of information specific to the business of Microchip is also
available, including listings of Microchip sales offices, distributors and factory
representatives.
®
or Microsoft® Internet Explorer.
Technical Support
• Frequently Asked Questions (FAQ)
• Online Discussion Groups – conferences for products, development systems,
technical information and more
• Microchip Consultant Program Member Listing
• Links to other useful web sites related to Microchip products
Engineer’s Toolbox
•Design Tips
• Device Errata
Other Available Information
• Latest Microchip Press Releases
• Listing of seminars and events
• Job Postings
DS70099B-page 4Advance Information 2003 Microchip Technology Inc.
DEVELOPMENT SYSTEMS CUSTOMER NOTIFICATION SERVICE
Microchip started the customer notification service to help our customers keep current
on Microchip products with the least amount of effort. Once you subscribe, you will
receive e-mail notification whenever we change, update, revise or have errata related
to a specified product family or development tool of interest.
Go to the Microchip web site at (http://www.microchip.com) and click on Customer
Change Notification. Follow the instructions to register.
The Development Systems product group categories are:
• Compilers
•Emulators
• In-Circuit Debuggers
• MPLAB IDE
• Programmers
Here is a description of these categories:
Compilers – The latest information on Microchip C compilers and other language
tools. These include the MPLAB C17, MPLAB C18 and MPLAB C30 C compilers;
MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object
linkers; 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 Microchip in-circuit debuggers.
These include the MPLAB ICD and MPLAB ICD 2.
MPLAB IDE – The latest information on Microchip MPLAB IDE, the Windows
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB SIM and MPLAB SIM30 simulators, MPLAB IDE
Project Manager and general editing and debugging features.
Programmers – The latest information on Microchip device programmers. These
include the PRO MATE
programmer.
®
II device programmer and PICSTART® Plus development
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Corporate Applications Engineer (CAE)
• Hotline
Customers should call their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. See the
back cover for a list of sales offices and locations.
Corporate Applications Engineers (CAEs) may be contacted at (480) 792-7627.
In addition, there is a Systems Information and Upgrade Line. This line provides system
users a list of the latest versions of all of Microchip’s development systems software
products. Plus, this line provides information on how customers can receive any
currently available upgrade kits.
The Hotline Numbers are:
1-800-755-2345 for U.S. and most of Canada.
1-480-792-7302 for the rest of the world.
DS70099B-page 6Advance Information 2003 Microchip Technology Inc.
DEVELOPMENT BOARD
5
Chapter 1. Introduction
1.1INTRODUCTION
The dsPICDEM 1.1 Development Board Kit serves as a development and evaluation
tool for the dsPIC30F High Performance Digital Signal Controllers.
1.2HIGHLIGHTS
This chapter discusses:
• dsPICDEM 1.1 Development Board Kit
• dsPICDEM 1.1 Development Board Features
• Running the
• Reference Documents
1.3dsPICDEM 1.1 DEVELOPMENT BOARD KIT
dsPICDEM 1.1 Demonstration Program
dsPICDEM™ 1.1
USER’S GUIDE
The dsPICDEM 1.1 Development Board Kit contains the following items:
• The dsPICDEM 1.1 Printed Circuit Board (Figure 1-1)
The dsPICDEM 1.1 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 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. “Demonstration Program Operation” for full details on the
demonstration code operation.
1.6REFERENCE DOCUMENTS
The following documentation is available to support the use of the dsPICDEM 1.1
Development Board:
• dsPIC30F Family Reference Manual (DS70046)
• dsPIC30F Data Sheet, Motor Control and Power Conversion Family (DS70082)
• dsPIC30F Data Sheet, General Purpose and Sensor Families (DS70083)
You can obtain these reference documents from your nearest Microchip sales office
(listed in the back of this document) or you can download them from the Microchip web
site (www.microchip.com).
DS70099B-page 10Advance Information 2003 Microchip Technology Inc.
2.1INTRODUCTION
This chapter is a self-paced tutorial to get you started using the dsPICDEM 1.1
Development Board.
2.2HIGHLIGHTS
Items discussed in this chapter include:
• Tutorial Overview
• Creating the Project
• Building the Code
• Programming the Chip
• Debugging the Code
• Summary
dsPICDEM™ 1.1
DEVELOPMENT BOARD
USER’S GUIDE
Chapter 2. Tutorial
2.3TUTORIAL OVERVIEW
The tutorial program in Tut6014.s 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
(p30f6014.gld) and an include file (p30f6014.inc) to form a complete project. The
tutorial is a simple project that 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.
There are four steps to this tutorial:
1. Create a project in MPLAB IDE.
2. Assemble and link the code.
3. Program the chip with the MPLAB ICD 2.
4. Debug the code with the MPLAB ICD 2.
2.4CREATING THE PROJECT
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 6.31 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 Development Board
code\Tutorial Code folder on the dsPICDEM 1.1 Development Kit CD, copy the
Tut6014.s file into the C:\Tutorial folder.
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
menu, select Project Wizard.
).
5. From the Device: pull-down list, select dsPIC30F6014 and click Next>. The
Project Wizard Step Two dialog displays (see Figure 2-2).
DS70099B-page 12Advance Information 2003 Microchip Technology Inc.
Tutorial
FIGURE 2-2:PROJECT WIZARD, STEP 2, SELECT LANGUAGE
TOOLSUITE
2.4.2Select Language Toolsuite
1. From the Active Toolsuite: pull-down menu, select Microchip C30 Toolsuite.
This toolsuite includes the assembler and linker that will be used (the C Compiler
is not used).
2. In the Toolsuite Contents block, select MPLAB ASM30 Assembler (pic30-as.exe).
3. In the Location block, click Browse... and navigate to:
E:\MPLAB IDE\dsPIC_Tools\Bin\pic30-as.exe
4. With MPLAB LINK 30 Object Linker (pic30-Id.exe) selected in Toolsuite
Contents, click Browse... and navigate to:
E:\MPLAB IDE\dsPIC_Tools\Bin\pic30-ld.exe
5. Click Next> to continue. The Project Wizard Step Three dialog displays
(see Figure 2-3).
Note:The tool locations for your environment may be different from those shown
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 Tut6014.s file in the project window to open the file. MPLAB IDE should now look
similar to Figure 2-6.
FIGURE 2-6:MPLAB IDE WORKSPACE WINDOWS
Project
Window
Output
Window
Source
Code
Window
DS70099B-page 16Advance Information 2003 Microchip Technology Inc.
2.5BUILDING THE CODE
In this project, building the code consists of assembling the Tut6014.s file to create
an object file, Tut6014.o, and then linking the object file to create the Tut6014.hex
and Tut6014.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 Tut6014.s file:
.include "p30f6014.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 Options>Project
Options dialog displays, as shown in Figure 2-7.
FIGURE 2-7:BUILD OPTIONS
Tutorial
from the Project> menu. The Build
Browse to the location of the
assembler Include file