© 2006 Microchip Technology Inc. DS51519BMPLAB® IDEUser’s Guide
MPLAB® IDE User’s GuideDS51519B-page x © 2006 Microchip Technology Inc.NOTES:
MPLAB® IDE User’s GuideDS51519B-page 90 © 2006 Microchip Technology Inc.7.2.1 Selecting the Language ToolsuiteOnce a workspace is opened, a toolsuite
Integrated Language Tools© 2006 Microchip Technology Inc. DS51519B-page 91Microchip ASM30 ToolsuiteThis toolsuite includes the language tools MPLAB AS
MPLAB® IDE User’s GuideDS51519B-page 92 © 2006 Microchip Technology Inc.DocumentationPlease find the following C compiler documentation on the MPLAB I
Integrated Language Tools© 2006 Microchip Technology Inc. DS51519B-page 937.4 THIRD PARTY LANGUAGE TOOLSCurrently supported third-party language tools
MPLAB® IDE User’s GuideDS51519B-page 94 © 2006 Microchip Technology Inc.• If you closed the previous dialog, select Project>Set Language Tool Locat
Integrated Language Tools© 2006 Microchip Technology Inc. DS51519B-page 957.4.6 microEngineering Labs Language ToolsMPLAB IDE supports the following m
MPLAB® IDE User’s GuideDS51519B-page 96 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 97MPLAB® IDEUSER’S GUIDEChapter 8. Integrated Software/Hardware Tools8.1 INTRODUCTIONMPLAB IDE is desi
MPLAB® IDE User’s GuideDS51519B-page 98 © 2006 Microchip Technology Inc.8.4 IN-CIRCUIT EMULATORSThe following Microchip in-circuit emulators are suppo
Integrated Software/Hardware Tools© 2006 Microchip Technology Inc. DS51519B-page 99Help FilesFrom the MPLAB IDE Help menu, select Topics and then sele
MPLAB® IDEUSER’S GUIDE© 2006 Microchip Technology Inc. DS51519B-page 1PrefaceINTRODUCTIONThis chapter contains general information that will be useful
MPLAB® IDE User’s GuideDS51519B-page 100 © 2006 Microchip Technology Inc.NOTES:
MPLAB® IDEUSER’S GUIDE© 2006 Microchip Technology Inc. DS51519B-page 101Chapter 9. MPLAB Macros9.1 INTRODUCTIONMPLAB IDE supports the creation of mac
MPLAB® IDE User’s GuideDS51519B-page 102 © 2006 Microchip Technology Inc.9.3 MACRO MENU AND TOOLBARThe Macro menu contains the following functions:• R
© 2006 Microchip Technology Inc. DS51519B-page 103MPLAB® IDEUSER’S GUIDEPart 3 – MPLAB IDE ReferenceChapter 10. MPLAB IDE Troubleshooting...
MPLAB® IDE User’s GuideDS51519B-page 104 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 105MPLAB® IDEUSER’S GUIDEChapter 10. MPLAB IDE Troubleshooting10.1 INTRODUCTIONThis section is designe
MPLAB® IDE User’s GuideDS51519B-page 106 © 2006 Microchip Technology Inc.I cannot get my language tools to work with MPLAB IDE.You may need a newer ve
MPLAB IDE Troubleshooting© 2006 Microchip Technology Inc. DS51519B-page 107I tried to Step Over / Step Out of a function/subroutine, and now my progra
MPLAB® IDE User’s GuideDS51519B-page 108 © 2006 Microchip Technology Inc.Unresolved BreakpointsThis message displays when breakpoints aren't set
© 2006 Microchip Technology Inc. DS51519B-page 109MPLAB® IDEUSER’S GUIDEChapter 11. MPLAB IDE Desktop11.1 INTRODUCTIONThe MPLAB IDE desktop is a resi
MPLAB® IDE User’s GuideDS51519B-page 2 © 2006 Microchip Technology Inc.• Chapter 5: External Memory Handling – Describes how MPLAB IDE handles Microc
MPLAB® IDE User’s GuideDS51519B-page 110 © 2006 Microchip Technology Inc.OpenOpens an existing source file. You may select multiple files in the Open
MPLAB IDE Desktop© 2006 Microchip Technology Inc. DS51519B-page 111ExitCloses the MPLAB IDE application.11.2.2 EditBelow are the menu items in the Edi
MPLAB® IDE User’s GuideDS51519B-page 112 © 2006 Microchip Technology Inc.AdvancedAdvanced editing features. Includes making selected text all uppercas
MPLAB IDE Desktop© 2006 Microchip Technology Inc. DS51519B-page 113OpenAdd an existing project to the workspace and set as active. Opens the Open Proj
MPLAB® IDE User’s GuideDS51519B-page 114 © 2006 Microchip Technology Inc.Select Language ToolsuiteSelect the toolsuite you will use for your project,
MPLAB IDE Desktop© 2006 Microchip Technology Inc. DS51519B-page 115HaltHalt (stop) the execution of program code. When you click Halt, status informat
MPLAB® IDE User’s GuideDS51519B-page 116 © 2006 Microchip Technology Inc.Enable ProgrammerEstablish communications between MPLAB IDE and the programme
MPLAB IDE Desktop© 2006 Microchip Technology Inc. DS51519B-page 117RTOS ViewerIf you have a Real-Time Operating System (RTOS) installed and included i
MPLAB® IDE User’s GuideDS51519B-page 118 © 2006 Microchip Technology Inc.Tile HorizontallyArrange open windows in smaller sizes to fit next to each ot
MPLAB IDE Desktop© 2006 Microchip Technology Inc. DS51519B-page 11911.3 MPLAB IDE TOOLBARSMPLAB IDE displays different toolbars depending on which fea
Preface© 2006 Microchip Technology Inc. DS51519B-page 3CONVENTIONS USED IN THIS GUIDEThe following conventions may appear in this documentation:DOCUME
MPLAB® IDE User’s GuideDS51519B-page 120 © 2006 Microchip Technology Inc.11.3.3 Debug ToolbarThe Debug Toolbar currently contains button icons for the
MPLAB IDE Desktop© 2006 Microchip Technology Inc. DS51519B-page 12111.4 MPLAB IDE STATUS BARThe status bar provides up-to-date information on the stat
MPLAB® IDE User’s GuideDS51519B-page 122 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 123MPLAB® IDEUSER’S GUIDEChapter 12. MPLAB IDE Windows12.1 INTRODUCTIONMPLAB IDE windows behave as nor
MPLAB® IDE User’s GuideDS51519B-page 124 © 2006 Microchip Technology Inc.12.2 CHANGING WINDOW DATA AND PROPERTIESMPLAB IDE windows have some or all of
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 12512.2.2.2 MAKING WINDOWS DOCKABLEWindows may be made dockable by clicking on the win
MPLAB® IDE User’s GuideDS51519B-page 126 © 2006 Microchip Technology Inc.12.2.2.4 UNDOCKING DOCKABLE WINDOWSDockable windows may be undocked by double
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 12712.2.3.2 MAKE COLUMNS VISIBLE/INVISIBLEColumns can be made visible/invisible as fol
MPLAB® IDE User’s GuideDS51519B-page 128 © 2006 Microchip Technology Inc.12.3 CODE DISPLAY WINDOW SYMBOLSIn the gutter of some windows, the following
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 12912.4 PROJECT WINDOWThe Project window contains a summary of information about the p
MPLAB® IDE User’s GuideDS51519B-page 4 © 2006 Microchip Technology Inc.RECOMMENDED READINGThis user's guide describes how to use MPLAB IDE. Other
MPLAB® IDE User’s GuideDS51519B-page 130 © 2006 Microchip Technology Inc.12.4.2 Project Window Menus – Files TabDepending on where you click in the pr
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 131Save AsSave the active project to a new location/name. See Section 13.22 “Save Proj
MPLAB® IDE User’s GuideDS51519B-page 132 © 2006 Microchip Technology Inc.Add FilesInsert files into the project. Depending on the type of file, MPLAB
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 133FIGURE 12-7: SYMBOL TREE GENERAL STRUCTUREIf the project name is in bold, it is the
MPLAB® IDE User’s GuideDS51519B-page 134 © 2006 Microchip Technology Inc.12.4.5 Project Window FAQHow do I:Create/Update a project?See Section 4.3 “Cr
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 13512.6 DISASSEMBLY LISTING WINDOWSelect View>Disassembly Listing to view disassemb
MPLAB® IDE User’s GuideDS51519B-page 136 © 2006 Microchip Technology Inc.12.7 HARDWARE STACK WINDOWThe Hardware Stack window displays the contents of
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 13712.7.3 Hardware Stack Window FAQHow do I:Understand the Return Address information?
MPLAB® IDE User’s GuideDS51519B-page 138 © 2006 Microchip Technology Inc.• Label (Symbolic Only) – Opcode label in symbolic format.• Disassembly – A d
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 139Center Debug LocationCenter the current PC line in the window.Cursor Tracks Debug L
Preface© 2006 Microchip Technology Inc. DS51519B-page 5THE MICROCHIP WEB SITEMicrochip provides online support via our web site at www.microchip.com.
MPLAB® IDE User’s GuideDS51519B-page 140 © 2006 Microchip Technology Inc.Fill program memory with a value?Right click in the window and select “Fill M
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 14112.9.1.3 XY DATA (dsPIC DSC DEVICES ONLY)This format displays file register informa
MPLAB® IDE User’s GuideDS51519B-page 142 © 2006 Microchip Technology Inc.PropertiesSelect background colors for SRFs and unallocated memory. Also, set
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 143Export TableOpen the Export As dialog (see Section 13.10 “File Management Dialog”).
MPLAB® IDE User’s GuideDS51519B-page 144 © 2006 Microchip Technology Inc.12.11 MEMORY USAGE GAUGEThis window displays the amount of program and data m
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 14512.12.1 LCD Pixel Window DisplayFor devices that support LCD output, you can view r
MPLAB® IDE User’s GuideDS51519B-page 146 © 2006 Microchip Technology Inc.Output to FileWrite the displayed window contents to a text file.PrintPrint t
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 147• Additional Columns – Hex, Decimal, Binary, CharYou may add radix information to t
MPLAB® IDE User’s GuideDS51519B-page 148 © 2006 Microchip Technology Inc.12.14 WATCH WINDOWThe Watch window allows you to monitor program symbols whil
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 149Save Watch TabSave the contents of the currently selected Watch tab to a file.Load
MPLAB® IDE User’s GuideDS51519B-page 6 © 2006 Microchip Technology Inc.CUSTOMER SUPPORTUsers of Microchip products can receive assistance through seve
MPLAB® IDE User’s GuideDS51519B-page 150 © 2006 Microchip Technology Inc.Load a previously saved Watch window?Click the right mouse button in the wind
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 15112.16.1 SFRs Window DisplayData is displayed in the following columns.• Address – S
MPLAB® IDE User’s GuideDS51519B-page 152 © 2006 Microchip Technology Inc.12.16.3 SFRs Window FAQHow do I:Fill all registers with a value?Right click i
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 153Source Code PaneCorresponding source code may be viewed in the lower portion of the
MPLAB® IDE User’s GuideDS51519B-page 154 © 2006 Microchip Technology Inc.Output to FileExport the contents of the trace memory window to a file. Uses
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 155Window Controls• Trigger Position – Three radio buttons allow you to specify where
MPLAB® IDE User’s GuideDS51519B-page 156 © 2006 Microchip Technology Inc.Import/Export TableImport from or export to a logic data file.12.18.3 Logic A
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 157For more information, see Section 6.2 “Configuration Bits”.• Configuration Bits Win
MPLAB® IDE User’s GuideDS51519B-page 158 © 2006 Microchip Technology Inc.Develop with Configuration bits set in code?To use only Configuration bits in
MPLAB IDE Windows© 2006 Microchip Technology Inc. DS51519B-page 159Add Filter-in TraceAdd filter-in trace tags on selected code text. See Section 15.5
MPLAB® IDEUSER’S GUIDE© 2006 Microchip Technology Inc. DS51519B-page 7Part 1 – MPLAB IDE Getting StartedChapter 1. What is MPLAB® IDE? ...
MPLAB® IDE User’s GuideDS51519B-page 160 © 2006 Microchip Technology Inc.AdvancedSet advanced text features. Make selected text all uppercase or lower
© 2006 Microchip Technology Inc. DS51519B-page 161MPLAB® IDEUSER’S GUIDEChapter 13. MPLAB IDE Dialogs13.1 INTRODUCTIONMPLAB IDE dialog boxes behave a
MPLAB® IDE User’s GuideDS51519B-page 162 © 2006 Microchip Technology Inc.13.2 ABOUT MPLAB IDE DIALOGSelect Help>About MPLAB IDE to open the About M
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 16313.4 BREAKPOINTS DIALOGSelect Debugger>Breakpoints to open the Breakpoints dialo
MPLAB® IDE User’s GuideDS51519B-page 164 © 2006 Microchip Technology Inc.Fix unresolved breakpointsIf you have set a breakpoint on a line of high-leve
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 16513.6 CONFIGURE CHANNEL DIALOGSelect pin and/or bus signals to be used by the Logic
MPLAB® IDE User’s GuideDS51519B-page 166 © 2006 Microchip Technology Inc.13.8 EXPORT HEX FILE DIALOGThe Export Hex File dialog is available from File&
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 16713.10 FILE MANAGEMENT DIALOGA file management dialog allows you to manage source an
MPLAB® IDE User’s GuideDS51519B-page 168 © 2006 Microchip Technology Inc.13.11 FILL MEMORY/REGISTERS DIALOGTo fill memory with a value, right click in
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 169Examples13.13 FIND AND REPLACE DIALOGSUse the Find dialog (Edit>Find) to find an
MPLAB® IDE User’s GuideDS51519B-page 8 © 2006 Microchip Technology Inc.NOTES:
MPLAB® IDE User’s GuideDS51519B-page 170 © 2006 Microchip Technology Inc.13.15 HELP TOPICS DIALOGSelect Help>Topics to open the MPLAB IDE Help Topi
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 17113.19 PROJECT-DISPLAY PREFERENCES DIALOGRight click in an empty area of the Project
MPLAB® IDE User’s GuideDS51519B-page 172 © 2006 Microchip Technology Inc.To Change Column Width• Make the window active.• Move the cursor over the lin
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 17313.23 SELECT DEVICE DIALOGTo choose a device for development, select Configure>S
MPLAB® IDE User’s GuideDS51519B-page 174 © 2006 Microchip Technology Inc.13.24 SELECT LANGUAGE TOOLSUITE DIALOGSelect Project>Select Language Tools
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 17513.26.1 Workspace TabSelect Configure>Settings and click the Workspace tab to se
MPLAB® IDE User’s GuideDS51519B-page 176 © 2006 Microchip Technology Inc.What Memory is to be Cleared13.26.4 Hot Keys TabSelect Configure>Settings
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 177E.g., Hot keys are assigned to an MPLAB ICD 2 debugger command and an MPLAB PM3 pro
MPLAB® IDE User’s GuideDS51519B-page 178 © 2006 Microchip Technology Inc.13.27 TABLE SETUP DIALOGRight click in a window and select “Import Table” or
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 17913.29 VERSION CONTROL DIALOGSelect Project>Version Control to open the Version C
© 2006 Microchip Technology Inc. DS51519B-page 9MPLAB® IDEUSER’S GUIDEChapter 1. What is MPLAB® IDE?1.1 AN OVERVIEW OF EMBEDDED SYSTEMSMPLAB IDE is a
MPLAB® IDE User’s GuideDS51519B-page 180 © 2006 Microchip Technology Inc.Microsoft Visual SourceSafeSubversion13.30 WATCH/LOCALS DIALOGSet up the Watc
MPLAB IDE Dialogs© 2006 Microchip Technology Inc. DS51519B-page 18113.30.2 Preferences TabThis tab is used to select default settings for new symbols
MPLAB® IDE User’s GuideDS51519B-page 182 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 183MPLAB® IDEUSER’S GUIDEChapter 14. MPLAB IDE Operational Reference14.1 INTRODUCTIONReference informa
MPLAB® IDE User’s GuideDS51519B-page 184 © 2006 Microchip Technology Inc.14.4 SAVED INFORMATIONInformation concerning your setup of MPLAB IDE is saved
MPLAB IDE Operational Reference© 2006 Microchip Technology Inc. DS51519B-page 185RegistryThe following information is saved in the registry file of th
MPLAB® IDE User’s GuideDS51519B-page 186 © 2006 Microchip Technology Inc.• Promate II – PRO MATE II help and support files, and firmware.• Readmes – R
© 2006 Microchip Technology Inc. DS51519B-page 187MPLAB® IDEUSER’S GUIDEPart 4 – MPLAB EditorChapter 15. Using the Editor...
MPLAB® IDE User’s GuideDS51519B-page 188 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 189MPLAB® IDEUSER’S GUIDEChapter 15. Using the Editor15.1 INTRODUCTIONThe MPLAB Editor is an integrate
DS51519B-page ii © 2006 Microchip Technology Inc.Information contained in this publication regarding deviceapplications and the like is provided only
MPLAB® IDE User’s GuideDS51519B-page 10 © 2006 Microchip Technology Inc.1.1.3 Components of a MicrocontrollerThe PICmicro MCU has program memory for t
MPLAB® IDE User’s GuideDS51519B-page 190 © 2006 Microchip Technology Inc.15.2 CONFIGURING THE EDITORThe editor may be configured using two dialogs:• E
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 19115.2.1.2 TEXT TABSet up text properties using the Text tab on the Editor Options dia
MPLAB® IDE User’s GuideDS51519B-page 192 © 2006 Microchip Technology Inc.15.2.2 Editor Color Customization DialogYou can set color options to be used
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 19315.3 WORKING WITH FILESThe following editor features are available for working with
MPLAB® IDE User’s GuideDS51519B-page 194 © 2006 Microchip Technology Inc.15.3.5 Closing FilesThere are several ways of closing a file, as shown below:
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 19515.4 WORKING WITH TEXTThe following editor features are available for working with t
MPLAB® IDE User’s GuideDS51519B-page 196 © 2006 Microchip Technology Inc.15.4.2 Moving to a Specific LineNo matter where the cursor is in a file, you
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 19715.4.5 Pasting TextYou can paste any text contained in the Windows clipboard into a
MPLAB® IDE User’s GuideDS51519B-page 198 © 2006 Microchip Technology Inc.15.4.7 Replacing TextTo find and replace text in a file:1. Make sure the file
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 19915.4.11.1 INDENTINGTabs or spaces will be inserted as specified in the Editor Option
What is MPLAB® IDE?© 2006 Microchip Technology Inc. DS51519B-page 11The peripherals and the amount of memory an application needs to run a program lar
MPLAB® IDE User’s GuideDS51519B-page 200 © 2006 Microchip Technology Inc.15.5 WORKING WITH DEBUG FEATURESWhen a debugger is selected in MPLAB IDE, sev
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 20115.6 KEYBOARD FEATURESThe following keys are specified for the editor:•Shortcuts• Mo
MPLAB® IDE User’s GuideDS51519B-page 202 © 2006 Microchip Technology Inc.15.6.2 Movement and SelectionThe keyboard keystrokes shown in Table 15-2 may
Using the Editor© 2006 Microchip Technology Inc. DS51519B-page 20315.7 EDITOR TROUBLESHOOTINGThis section is designed to help you troubleshoot any pro
MPLAB® IDE User’s GuideDS51519B-page 204 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 205MPLAB® IDEUSER’S GUIDEPart 5 – MPLAB SIMChapter 16. Simulator Overview ...
MPLAB® IDE User’s GuideDS51519B-page 206 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 207MPLAB® IDEUSER’S GUIDEChapter 16. Simulator Overview16.1 INTRODUCTIONMPLAB SIM is a discrete-event
MPLAB® IDE User’s GuideDS51519B-page 208 © 2006 Microchip Technology Inc.Program memory, or core, instruction length is used to group PICmicro MCUs. D
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 20916.3.2 12-Bit Core Device SimulationThe following topics discuss the 12-bit core d
MPLAB® IDE User’s GuideDS51519B-page 12 © 2006 Microchip Technology Inc.FIGURE 1-4: PICmicro® MCU DATA SHEET – INSTRUCTIONS (EXCERPT)2. Compile, assem
MPLAB® IDE User’s GuideDS51519B-page 210 © 2006 Microchip Technology Inc.16.3.3 14-Bit Core Device SimulationThe following topics discuss the 14-bit c
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 211A WDT time-out is simulated when WDT is enabled, proper pre/postscaler is set and
MPLAB® IDE User’s GuideDS51519B-page 212 © 2006 Microchip Technology Inc.A/D Converter (Limited)All the registers, timing function and interrupt gener
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 21316.3.4.2 16-BIT CORE (PIC17) CPUReset ConditionsAll Reset conditions are supported
MPLAB® IDE User’s GuideDS51519B-page 214 © 2006 Microchip Technology Inc.Timer0Timer0 and the interrupt it can generate on overflow is fully supported
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 21516.3.5.2 16-BIT CORE (PIC18) CPUReset ConditionsAll Reset conditions are supported
MPLAB® IDE User’s GuideDS51519B-page 216 © 2006 Microchip Technology Inc.16.3.5.4 16-BIT CORE (PIC18) PERIPHERALSAlong with core support, MPLAB SIM su
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 217A/D Converter (Limited)All the registers, timing function and interrupt generation
MPLAB® IDE User’s GuideDS51519B-page 218 © 2006 Microchip Technology Inc.16.3.6.2 SYSTEM INTEGRATION BLOCKReset SourcesAll Reset sources are supported
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 21916.3.6.4 PERIPHERALSMPLAB SIM supports the following peripherals:• Input Capture/O
What is MPLAB® IDE?© 2006 Microchip Technology Inc. DS51519B-page 13Step 1 is driven by the designer, although MPLAB IDE can help in modeling circuits
MPLAB® IDE User’s GuideDS51519B-page 220 © 2006 Microchip Technology Inc.16.4 SIMULATOR EXECUTIONMPLAB SIM operation is specified in the following top
Simulator Overview© 2006 Microchip Technology Inc. DS51519B-page 221The following functions and peripherals are affected by simulation on instruction
MPLAB® IDE User’s GuideDS51519B-page 222 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 223MPLAB® IDEUSER’S GUIDEChapter 17. Getting Started with MPLAB SIM17.1 INTRODUCTIONIf you are new to
MPLAB® IDE User’s GuideDS51519B-page 224 © 2006 Microchip Technology Inc.17.5 USING THE STOPWATCHThe stopwatch is useful for simple timing between pro
Getting Started with MPLAB SIM© 2006 Microchip Technology Inc. DS51519B-page 22517.7.1 PIC18F MCU USART Example – SetupFollow the steps below to set u
MPLAB® IDE User’s GuideDS51519B-page 226 © 2006 Microchip Technology Inc.17.7.3 PIC18F MCU USART Example – SCL StimulusTo use SCL Stimulus input to si
Getting Started with MPLAB SIM© 2006 Microchip Technology Inc. DS51519B-page 227; software is owned by the Company and/or its supplier, and is ; prote
MPLAB® IDE User’s GuideDS51519B-page 228 © 2006 Microchip Technology Inc. bsf TXSTA,BRGH ; Select high baud rate bsf RCSTA,SPEN ; Ena
© 2006 Microchip Technology Inc. DS51519B-page 229MPLAB® IDEUSER’S GUIDEChapter 18. Using Stimulus18.1 INTRODUCTIONDuring simulation, the program bei
MPLAB® IDE User’s GuideDS51519B-page 14 © 2006 Microchip Technology Inc.1.2 THE DEVELOPMENT CYCLEThe process for writing an application is often descr
MPLAB® IDE User’s GuideDS51519B-page 230 © 2006 Microchip Technology Inc.18.2 SCL GENERATOR DIALOGUse the SCL Generator dialog to create synchronous s
Using Stimulus© 2006 Microchip Technology Inc. DS51519B-page 231SFR Values As TriggersTriggers and traces will ONLY occur when the SFR is updated by t
MPLAB® IDE User’s GuideDS51519B-page 232 © 2006 Microchip Technology Inc.When h:m:s is chosen, values input in the Time column will have the following
Using Stimulus© 2006 Microchip Technology Inc. DS51519B-page 233As an example, set up a condition, COND1, such that when the value of register PORTC e
MPLAB® IDE User’s GuideDS51519B-page 234 © 2006 Microchip Technology Inc.For the condition set up in the previous example, COND1, set up the following
Using Stimulus© 2006 Microchip Technology Inc. DS51519B-page 235To Change the Order of Signals on the Pin/Register tab:• Click on the signal from the
MPLAB® IDE User’s GuideDS51519B-page 236 © 2006 Microchip Technology Inc.18.2.5 Register InjectionRegisters may be injected with values set up in a fi
Using Stimulus© 2006 Microchip Technology Inc. DS51519B-page 23718.2.5.2 MESSAGE-BASED DATA FILE DESCRIPTIONData in the file will be interpreted in pa
MPLAB® IDE User’s GuideDS51519B-page 238 © 2006 Microchip Technology Inc.EXAMPLE 18-5: REGISTER STIMULUS FILE 218.2.6 Register TraceThe value of a sp
Using Stimulus© 2006 Microchip Technology Inc. DS51519B-page 23918.3 STIMULUS CONTROLLER DIALOGUse the Stimulus Controller dialog to control how stimu
What is MPLAB® IDE?© 2006 Microchip Technology Inc. DS51519B-page 151.3 PROJECT MANAGERThe project manager organizes the files to be edited and other
MPLAB® IDE User’s GuideDS51519B-page 240 © 2006 Microchip Technology Inc.18.4 STIMULUS INPUT INTERACTIONIf a pin (e.g., RB1) assignment and a port (e.
© 2006 Microchip Technology Inc. DS51519B-page 241MPLAB® IDEUSER’S GUIDEChapter 19. Using Stimulus – PIC17 Devices19.1 INTRODUCTIONStimulus functions
MPLAB® IDE User’s GuideDS51519B-page 242 © 2006 Microchip Technology Inc.Asynchronous Setupa) Click on “Pin” to select or change the pin on which stim
Using Stimulus – PIC17 Devices© 2006 Microchip Technology Inc. DS51519B-page 24319.2.3 Pin Stimulus DisplaySelect Debugger>Stimulus and then click
MPLAB® IDE User’s GuideDS51519B-page 244 © 2006 Microchip Technology Inc.•ActionType = Asynch:Pulse: Change the state of the pin to its opposite and r
Using Stimulus – PIC17 Devices© 2006 Microchip Technology Inc. DS51519B-page 24519.3.1.1 CREATING/EDITING A FILE STIMULUS FILE (.FSTI)A file stimulus
MPLAB® IDE User’s GuideDS51519B-page 246 © 2006 Microchip Technology Inc.PC Setupa) Click on “Trig Value” to set the PC address at which the trigger f
Using Stimulus – PIC17 Devices© 2006 Microchip Technology Inc. DS51519B-page 24719.3.3 File Stimulus DisplaySelect Debugger>Stimulus Controller and
MPLAB® IDE User’s GuideDS51519B-page 248 © 2006 Microchip Technology Inc.Buttons – File StimulusThese buttons enable you to save and restore combined
© 2006 Microchip Technology Inc. DS51519B-page 249MPLAB® IDEUSER’S GUIDEChapter 20. Simulator Troubleshooting20.1 INTRODUCTIONThis section is designe
MPLAB® IDE User’s GuideDS51519B-page 16 © 2006 Microchip Technology Inc.1.4 LANGUAGE TOOLSLanguage tools are programs such as cross-assemblers and cro
MPLAB® IDE User’s GuideDS51519B-page 250 © 2006 Microchip Technology Inc.I cannot set conditional breakpointsConditional breakpoints are not yet imple
© 2006 Microchip Technology Inc. DS51519B-page 251MPLAB® IDEUSER’S GUIDEChapter 21. Simulator Reference21.1 INTRODUCTIONOnce MPLAB SIM has been selec
MPLAB® IDE User’s GuideDS51519B-page 252 © 2006 Microchip Technology Inc.21.2.2 View MenuIn addition to the standard MPLAB IDE View menu items, the fo
Simulator Reference© 2006 Microchip Technology Inc. DS51519B-page 253Trace OptionsTo trace all lines of an executing program for display in the trace
MPLAB® IDE User’s GuideDS51519B-page 254 © 2006 Microchip Technology Inc.21.3.3 SCL Options tabSelect Debugger>Settings and then click the SCL Opti
Simulator Reference© 2006 Microchip Technology Inc. DS51519B-page 25521.3.6 Limitations tabSelect Debugger>Settings and then click the Limitation t
MPLAB® IDE User’s GuideDS51519B-page 256 © 2006 Microchip Technology Inc.WDT (Watchdog Timer) OptionsChoose one of the following to determine the simu
MPLAB® IDEUSER’S GUIDE© 2006 Microchip Technology Inc. DS51519B-page 257Appendix A. Revision HistoryA.1 REVISION HISTORYRevision A (10/2004)• Initial
MPLAB® IDE User’s GuideDS51519B-page 258 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 259MPLAB® IDEUSER’S GUIDEGlossaryAbsolute SectionA section with a fixed (absolute) address that cannot
What is MPLAB® IDE?© 2006 Microchip Technology Inc. DS51519B-page 171.5 TARGET DEBUGGINGIn a development environment, the execution of the code is tes
MPLAB® IDE User’s GuideDS51519B-page 260 © 2006 Microchip Technology Inc.Breakpoint, SoftwareAn address where execution of the firmware will halt. Usu
Glossary© 2006 Microchip Technology Inc. DS51519B-page 261DownloadDownload is the process of sending data from a host to another device, such as an em
MPLAB® IDE User’s GuideDS51519B-page 262 © 2006 Microchip Technology Inc.External SymbolA symbol for an identifier which has external linkage. This ma
Glossary© 2006 Microchip Technology Inc. DS51519B-page 263IDEIntegrated Development Environment. MPLAB IDE is Microchip’s integrated develop-ment envi
MPLAB® IDE User’s GuideDS51519B-page 264 © 2006 Microchip Technology Inc.Linker Script FilesLinker script files are the command files of a linker. The
Glossary© 2006 Microchip Technology Inc. DS51519B-page 265Microprocessor ModeOne of the possible program memory configurations of PIC17 and PIC18 micr
MPLAB® IDE User’s GuideDS51519B-page 266 © 2006 Microchip Technology Inc.MPLIB Object LibrarianMPLIB librarian is an object librarian for use with COF
Glossary© 2006 Microchip Technology Inc. DS51519B-page 267Pass CounterA counter that decrements each time an event (such as the execution of an instru
MPLAB® IDE User’s GuideDS51519B-page 268 © 2006 Microchip Technology Inc.RAMRandom Access Memory (Data Memory). Memory in which information can be acc
Glossary© 2006 Microchip Technology Inc. DS51519B-page 269SkidWhen a hardware breakpoint is used to halt the processor, one or more additional instruc
MPLAB® IDE User’s GuideDS51519B-page 18 © 2006 Microchip Technology Inc.1.6 DEVICE PROGRAMMINGAfter the application has been debugged and is running i
MPLAB® IDE User’s GuideDS51519B-page 270 © 2006 Microchip Technology Inc.SymbolA symbol is a general purpose mechanism for describing the various piec
Glossary© 2006 Microchip Technology Inc. DS51519B-page 271Watch VariableA variable that you may monitor during a debugging session in a Watch window.W
MPLAB® IDE User’s GuideDS51519B-page 272 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 273MPLAB® IDEUSER’S GUIDEIndexAAbout...
MPLAB® IDE User’s GuideDS51519B-page 274 © 2006 Microchip Technology Inc.FFAQ... 203, 249
Index© 2006 Microchip Technology Inc. DS51519B-page 275OOpen Dialog ... 167Osc/Trace Tab ...
MPLAB® IDE User’s GuideDS51519B-page 276 © 2006 Microchip Technology Inc.Stimulus ... 22
Index© 2006 Microchip Technology Inc. DS51519B-page 277NOTES:
DS51519B-page 278 © 2006 Microchip Technology Inc.AMERICASCorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7200 Fax: 48
What is MPLAB® IDE?© 2006 Microchip Technology Inc. DS51519B-page 191.7.2 Additional Optional Components for MPLAB IDEOptional components can be purch
MPLAB® IDEUSER’S GUIDE© 2006 Microchip Technology Inc. DS51519B-page iiiTable of ContentsPreface ...
MPLAB® IDE User’s GuideDS51519B-page 20 © 2006 Microchip Technology Inc.FIGURE 1-8: DEBUGGER>SETTINGS: LIMITATIONS TABPress the Details button to s
What is MPLAB® IDE?© 2006 Microchip Technology Inc. DS51519B-page 21MPLAB IDE Help covers all aspects of MPLAB IDE and all of the Microchip tools. It
MPLAB® IDE User’s GuideDS51519B-page 22 © 2006 Microchip Technology Inc.1.10 MPLAB IDE UPDATES AND VERSION NUMBERINGMPLAB IDE is an evolving program w
© 2006 Microchip Technology Inc. DS51519B-page 23MPLAB® IDEUSER’S GUIDEChapter 2. A Basic Tutorial for MPLAB IDE2.1 INTRODUCTIONMPLAB Integrated Deve
MPLAB® IDE User’s GuideDS51519B-page 24 © 2006 Microchip Technology Inc.2.2 MPLAB IDE FEATURES AND INSTALLATIONMPLAB IDE is a Windows® Operating Syste
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 252.2.2 Running MPLAB IDETo start MPLAB IDE, double click on the icon ins
MPLAB® IDE User’s GuideDS51519B-page 26 © 2006 Microchip Technology Inc.2.3 TUTORIAL OVERVIEWIn order to create code that is executable by the target
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 272.4 SELECTING THE DEVICETo show menu selections in this document, the m
MPLAB® IDE User’s GuideDS51519B-page 28 © 2006 Microchip Technology Inc.2.5 CREATING THE PROJECTThe next step is to create a project using the Project
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 292.6 SETTING UP LANGUAGE TOOLSStep Two of the Project Wizard sets up the
MPLAB® IDE User’s GuideDS51519B-page iv © 2006 Microchip Technology Inc.Chapter 3. Walk-Through and Detailed Tutorial3.1 Introduction ...
MPLAB® IDE User’s GuideDS51519B-page 30 © 2006 Microchip Technology Inc.2.7 NAMING THE PROJECTStep Three of the wizard allows you to name the project
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 312.8 ADDING FILES TO THE PROJECTStep Four of the Project Wizard allows f
MPLAB® IDE User’s GuideDS51519B-page 32 © 2006 Microchip Technology Inc.FIGURE 2-7: PROJECT WIZARD – SELECT LINKER SCRIPTMake sure that your dialog lo
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 33After pressing the Finish button, review the Project Window on the MPLA
MPLAB® IDE User’s GuideDS51519B-page 34 © 2006 Microchip Technology Inc.2.9 BUILDING THE PROJECTFrom the Project menu, we can assemble and link the cu
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 352.10 CREATING CODEOpen the template file in the project by double click
MPLAB® IDE User’s GuideDS51519B-page 36 © 2006 Microchip Technology Inc.FIGURE 2-13: TEMPLATE FILE – MAINWhen any source file is opened, you are autom
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 37In this bit of code, we used three variables named COUNT, DVAR and DVAR
MPLAB® IDE User’s GuideDS51519B-page 38 © 2006 Microchip Technology Inc.If the code did not assemble and link successfully, check the following items
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 39Select the simulator as the debug execution tool. This is done from the
Table of Contents© 2006 Microchip Technology Inc. DS51519B-page vChapter 6. Additional Features6.1 Introduction ...
MPLAB® IDE User’s GuideDS51519B-page 40 © 2006 Microchip Technology Inc.Next, select Debugger>Reset>Processor Reset and a green arrow shows wher
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 41Next, press the Step Into icon or select Debugger>Step Into to singl
MPLAB® IDE User’s GuideDS51519B-page 42 © 2006 Microchip Technology Inc.The pull down on the right, allows symbols to be added from the program. Use t
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 43You could continue single stepping through the code, but instead, set a
MPLAB® IDE User’s GuideDS51519B-page 44 © 2006 Microchip Technology Inc.Select Debugger>Run to run the application. A text message “Running…” will
A Basic Tutorial for MPLAB IDE© 2006 Microchip Technology Inc. DS51519B-page 45Use Debugger>StopWatch to bring up the StopWatch dialog. Make sure t
MPLAB® IDE User’s GuideDS51519B-page 46 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 47MPLAB® IDEUSER’S GUIDEChapter 3. Walk-Through and Detailed Tutorial3.1 INTRODUCTIONThis walk-through
MPLAB® IDE User’s GuideDS51519B-page 48 © 2006 Microchip Technology Inc.3.2 SELECTING A DEVICETo begin application development, select the Microchip d
Walk-Through and Detailed Tutorial© 2006 Microchip Technology Inc. DS51519B-page 493.4 CREATING SOURCE CODE WITH THE EDITORSelect File>New to open
MPLAB® IDE User’s GuideDS51519B-page vi © 2006 Microchip Technology Inc.Chapter 12. MPLAB IDE Windows12.1 Introduction ...
MPLAB® IDE User’s GuideDS51519B-page 50 © 2006 Microchip Technology Inc.3.6 USING THE PROJECT WIZARDTo create a new project in the current workspace,
Walk-Through and Detailed Tutorial© 2006 Microchip Technology Inc. DS51519B-page 513.8 NAMING AND LOCATING THE PROJECTYou will now enter a name and lo
MPLAB® IDE User’s GuideDS51519B-page 52 © 2006 Microchip Technology Inc.The linker script files are as follows: • DevNum – the number associated with
Walk-Through and Detailed Tutorial© 2006 Microchip Technology Inc. DS51519B-page 533.11 VIEWING THE PROJECT WINDOWIf it is not already open, open the
MPLAB® IDE User’s GuideDS51519B-page 54 © 2006 Microchip Technology Inc.To override project settings for a particular project file, e.g., ProjFile1.as
Walk-Through and Detailed Tutorial© 2006 Microchip Technology Inc. DS51519B-page 553.14 CHOOSING A DEBUGGERChoose a tool to help debug your code from
MPLAB® IDE User’s GuideDS51519B-page 56 © 2006 Microchip Technology Inc.Tutorial Step 14:Reset your code (Debugger>Reset) and then run it by clicki
Walk-Through and Detailed Tutorial© 2006 Microchip Technology Inc. DS51519B-page 57The file register address of the symbols is listed first, followed
MPLAB® IDE User’s GuideDS51519B-page 58 © 2006 Microchip Technology Inc.3.19 CHOOSING A PROGRAMMEROnce you have your code debugged and running smoothl
MPLAB® IDEUSER’S GUIDE© 2006 Microchip Technology Inc. DS51519B-page 59Part 2 – MPLAB IDE FeaturesChapter 4. Projects and Workspaces ...
Table of Contents© 2006 Microchip Technology Inc. DS51519B-page viiChapter 13. MPLAB IDE Dialogs13.1 Introduction ...
MPLAB® IDE User’s GuideDS51519B-page 60 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 61MPLAB® IDEUSER’S GUIDEChapter 4. Projects and Workspaces4.1 INTRODUCTIONTwo major features of MPLAB
MPLAB® IDE User’s GuideDS51519B-page 62 © 2006 Microchip Technology Inc.4.2 USING THE PROJECT WIZARDThe project wizard consists of several dialogs whi
Projects and Workspaces© 2006 Microchip Technology Inc. DS51519B-page 634.2.4 Project Wizard – Name Your ProjectStep 3: Name Your Project – Enter a na
MPLAB® IDE User’s GuideDS51519B-page 64 © 2006 Microchip Technology Inc.5. Enter files in the project by selecting Project>Add Files to Project, by
Projects and Workspaces© 2006 Microchip Technology Inc. DS51519B-page 654.5 PROJECT FOLDERS AND FILESDepending on how you have structured your project
MPLAB® IDE User’s GuideDS51519B-page 66 © 2006 Microchip Technology Inc.4.6 USING A VERSION CONTROL SYSTEM (VCS)If you want to use a version control s
Projects and Workspaces© 2006 Microchip Technology Inc. DS51519B-page 674.6.1 Microsoft Visual Source SafeHaving some knowledge of VSS and MPLAB IDE i
MPLAB® IDE User’s GuideDS51519B-page 68 © 2006 Microchip Technology Inc.An example of performing the checkout is listed below:$ cd DirABOVEWhereIWantM
Projects and Workspaces© 2006 Microchip Technology Inc. DS51519B-page 694.7 SETTING UP/CHANGING A PROJECTYou can use the following steps to create a n
MPLAB® IDE User’s GuideDS51519B-page viii © 2006 Microchip Technology Inc.Part 4 – MPLAB EditorChapter 15. Using the Editor15.1 Introduction ...
MPLAB® IDE User’s GuideDS51519B-page 70 © 2006 Microchip Technology Inc.4.7.3 Setting Up a Project – Set Up Language ToolsTo add language tools for us
Projects and Workspaces© 2006 Microchip Technology Inc. DS51519B-page 714.7.6 Setting Up a Project – Set Build OptionsMPLAB IDE has default settings f
MPLAB® IDE User’s GuideDS51519B-page 72 © 2006 Microchip Technology Inc.4.8 USING A SINGLE PROJECT AND WORKSPACEThe most common configuration for appl
Projects and Workspaces© 2006 Microchip Technology Inc. DS51519B-page 734.9.1 Setting Up Multiple ProjectsTo set up the workspace to use multiple proj
MPLAB® IDE User’s GuideDS51519B-page 74 © 2006 Microchip Technology Inc.The last project opened in a workspace will automatically be set as the active
© 2006 Microchip Technology Inc. DS51519B-page 75MPLAB® IDEUSER’S GUIDEChapter 5. External Memory Handling5.1 INTRODUCTIONSome Microchip devices allo
MPLAB® IDE User’s GuideDS51519B-page 76 © 2006 Microchip Technology Inc.• The Extended Microcontroller mode allows access to both internal and externa
External Memory Handling© 2006 Microchip Technology Inc. DS51519B-page 775.2.5 External Memory InterfaceThe External Memory Interface is a feature tha
MPLAB® IDE User’s GuideDS51519B-page 78 © 2006 Microchip Technology Inc.NOTES:
© 2006 Microchip Technology Inc. DS51519B-page 79MPLAB® IDEUSER’S GUIDEChapter 6. Additional Features6.1 INTRODUCTIONMPLAB IDE contains additional fe
Table of Contents© 2006 Microchip Technology Inc. DS51519B-page ixAppendix A. ...
MPLAB® IDE User’s GuideDS51519B-page 80 © 2006 Microchip Technology Inc.6.2.4 Setting for External Memory UseIf your device supports external memory,
Additional Features© 2006 Microchip Technology Inc. DS51519B-page 81To add a symbol to a Watch view:• Select the symbol from the drop-down list and th
MPLAB® IDE User’s GuideDS51519B-page 82 © 2006 Microchip Technology Inc.6.3.3 Deleting from a Watch ViewTo delete an entry:• Click on the entry to sel
Additional Features© 2006 Microchip Technology Inc. DS51519B-page 83To import Watch variable values from a table:• Click on an entry to select the SFR
MPLAB® IDE User’s GuideDS51519B-page 84 © 2006 Microchip Technology Inc.6.3.9 Watch Window and Associated DialogsThe following MPLAB IDE windows and d
Additional Features© 2006 Microchip Technology Inc. DS51519B-page 85• When you delete a breakpoint in the Program Memory window on any line of assembl
MPLAB® IDE User’s GuideDS51519B-page 86 © 2006 Microchip Technology Inc.6.6 MICROCHIP HELPMicrochip Technology provides on-line HTML help for MPLAB ID
Additional Features© 2006 Microchip Technology Inc. DS51519B-page 876.6.2 Navigating in the Help ViewerThe main features of the help viewer are shown
MPLAB® IDE User’s GuideDS51519B-page 88 © 2006 Microchip Technology Inc.Navigation PaneTo close this pane, click on the Hide button (which will change
© 2006 Microchip Technology Inc. DS51519B-page 89MPLAB® IDEUSER’S GUIDEChapter 7. Integrated Language Tools7.1 INTRODUCTIONMPLAB IDE is designed to w
Kommentare zu diesen Handbüchern