Release Notes for MPLAB(R) ICD 2 In-Circuit Debugger MPLAB(R) IDE v7.10 MPLAB ICD 2 DLL v7.10 Operating System (Firmware) Files PIC12F/16F v2.06.05 (ICD01020605.hex) PIC18F v2.06.06 (ICD04020606.hex) PIC18F Extended v1.02.05 (ICD05010205.hex) PIC18C601/801 v1.02.02 (ICD06010202.hex) PIC10F2XX,PIC16F54/57 v1.02.09 (ICD07010209.hex) PIC16F68X v1.03.04 (ICD08010304.hex) PIC16F629/675/630/676 v1.00.00 (ICD09010000.hex) dsPIC30F Rev B1 v1.02.08 (ICD10010208.hex) PIC18F67J/87J v0.00.19 (ICD11000019.hex) PIC16F72, PIC16F8X, v1.02.00 (ICD12010200.hex) PIC16F627/628 March 16, 2005 ***************************************************************** IMPORTANT: Do not allow Windows(R) OS to pick a default USB driver; MPLAB ICD 2 will not work with this driver. You must follow the procedure specified at MPLAB IDE software installation for USB driver set-up. If you did not set up the port during MPLAB IDE installation, see the section in this readme file on USB Port Setup. ***************************************************************** ----------------------------------------------------------------- Table of Contents ----------------------------------------------------------------- 1. Device Support List 2. PC Operating System Support List 3. Reference Documents 4. What's New/Updated 5. USB Port Setup 6. Powering the MPLAB ICD 2 and Target Board 7. Setting Up the MPLAB ICD 2 and Target Board 8. PIC18C601/801 Users 9. Known Problems 10. Important Notes 11. Universal Programming Module (AC162049) 12. Reserved Resources ----------------------------------------------------------------- 1. Device Support List ----------------------------------------------------------------- Debugger -------- dsPIC30F2010 PIC16F767 PIC18F248 PIC18F4610 dsPIC30F2011* PIC16F777 PIC18F2510 PIC18F4620 dsPIC30F2012* PIC16F785* PIC18F2515 PIC18F4680 dsPIC30F3010 PIC16F818 PIC18F252 PIC18F6310 dsPIC30F3011 PIC16F819 PIC18F2520 PIC18F6390 dsPIC30F3012 PIC16F87 PIC18F2525 PIC18F6410 dsPIC30F3013 PIC16F870 PIC18F2539 PIC18F6490 dsPIC30F3014 PIC16F871 PIC18F2550 PIC18F6520 dsPIC30F4011 PIC16F872 PIC18F258 PIC18F6525 dsPIC30F4012 PIC16F873 PIC18F2580 PIC18F6585 dsPIC30F4013 PIC16F873A PIC18F2585 PIC18F6620 dsPIC30F5011 PIC16F874 PIC18F2610 PIC18F6621 dsPIC30F5013 PIC16F874A PIC18F2620 PIC18F6627 dsPIC30F6010 PIC16F876 PIC18F2680 PIC18F6680 dsPIC30F6011 PIC16F876A PIC18F4220 PIC18F6720 dsPIC30F6012 PIC16F877 PIC18F4320 PIC18F6722 dsPIC30F6013 PIC16F877A PIC18F4331 PIC18F67J10* dsPIC30F6014 PIC16F88 PIC18F4410 PIC18F8310 PIC12F629! PIC16F913* PIC18F442 PIC18F8390 PIC12F635! PIC16F914* PIC18F4420 PIC18F8410 PIC12F675! PIC16F916 PIC18F4431 PIC18F8490 PIC12F683 PIC16F917 PIC18F4439 PIC18F8520 PIC16F627A! PIC18C601 PIC18F4455 PIC18F8525 PIC16F628A! PIC18C801 PIC18F448 PIC18F8585 PIC16F630! PIC18F1220 PIC18F4510 PIC18F8620 PIC16F636! PIC18F1320 PIC18F4515 PIC18F8621 PIC16F639* PIC18F2220 PIC18F452 PIC18F8627 PIC16F648A! PIC18F2320 PIC18F4520 PIC18F8680 PIC16F676! PIC18F2331 PIC18F4525 PIC18F8720 PIC16F684! PIC18F2410 PIC18F4539 PIC18F8722 PIC16F688! PIC18F242 PIC18F4550 PIC18F87J10* PIC16F716! PIC18F2420 PIC18F458 PIC16F737 PIC18F2431 PIC18F4580 PIC16F747 PIC18F2439 PIC18F4585 Programmer ---------- dsPIC30F2010 PIC16F648A PIC18C801 PIC18F452 dsPIC30F2011* PIC16F676 PIC18F1220 PIC18F4520 dsPIC30F2012* PIC16F684 PIC18F1320 PIC18F4525 dsPIC30F3010 PIC16F685* PIC18F2220 PIC18F4539 dsPIC30F3011 PIC16F687* PIC18F2320 PIC18F4550 dsPIC30F3012 PIC16F688 PIC18F2331 PIC18F458 dsPIC30F3013 PIC16F689* PIC18F2410 PIC18F4580 dsPIC30F3014 PIC16F690* PIC18F242 PIC18F4585 dsPIC30F4011 PIC16F716 PIC18F2420 PIC18F4610 dsPIC30F4012 PIC16F72 PIC18F2431 PIC18F4620 dsPIC30F4013 PIC16F73 PIC18F2439 PIC18F4680 dsPIC30F5011 PIC16F737 PIC18F2455* PIC18F6310 dsPIC30F5013 PIC16F74 PIC18F248 PIC18F6390 dsPIC30F6010 PIC16F747 PIC18F2480 PIC18F6410 dsPIC30F6011 PIC16F76 PIC18F2510 PIC18F6490 dsPIC30F6012 PIC16F767 PIC18F2515 PIC18F6520 dsPIC30F6013 PIC16F77 PIC18F252 PIC18F6525 dsPIC30F6014 PIC16F777 PIC18F2520 PIC18F6585 PIC10F200!! PIC16F785 PIC18F2525 PIC18F6620 PIC10F202!! PIC16F818 PIC18F2539 PIC18F6621 PIC10F204!! PIC16F819 PIC18F2550 PIC18F6627 PIC10F206!! PIC16F84A PIC18F258 PIC18F6680 PIC12F508 PIC16F87 PIC18F2580 PIC18F6720 PIC12F509 PIC16F870 PIC18F2585 PIC18F6722* PIC12F510* PIC16F871 PIC18F2610 PIC18F67J10* PIC12F629 PIC16F872 PIC18F2620 PIC18F8310 PIC12F635 PIC16F873 PIC18F2680 PIC18F8390 PIC12F675 PIC16F873A PIC18F4220 PIC18F8410 PIC12F683 PIC16F874 PIC18F4320 PIC18F8490 PIC16F505 PIC16F874A PIC18F4331 PIC18F8520 PIC16F54 PIC16F876 PIC18F4410 PIC18F8525 PIC16F57 PIC16F876A PIC18F442 PIC18F8585 PIC16F59 PIC16F877 PIC18F4420 PIC18F8620 PIC16F627 PIC16F877A PIC18F4431 PIC18F8621 PIC16F627A PIC16F88 PIC18F4439 PIC18F8627 PIC16F628 PIC16F913 PIC18F4455 PIC18F8680 PIC16F628A PIC16F914 PIC18F448 PIC18F8720 PIC16F630 PIC16F916 PIC18F4480 PIC18F8722 PIC16F636 PIC16F917 PIC18F4510 PIC18F87J10* PIC16F639 PIC18C601 PIC18F4515 * Indicates beta-support part(s) in this release. ! Header interface board required. See "MPLAB ICD 2 Header Information Sheet", DS51292, for a list of available headers by device number. !! PIC10F2XX Universal programmer adapter required (AC163020). ----------------------------------------------------------------- 2. Operating System Support List ----------------------------------------------------------------- This tool has been tested using the following operating systems: Windows(R) 98 SE, Windows ME, Windows NT 4.0 SP6a Workstations (NOT Servers), Windows 2000 SP4, Windows XP ----------------------------------------------------------------- 3. Reference Documents ----------------------------------------------------------------- The following documents may be found on our website or MPLAB IDE CD-ROM: * Using MPLAB ICD 2 Poster DS51265 * MPLAB ICD 2 User's Guide DS51331 * MPLAB ICD 2 Header Information Sheet DS51292 * Universal Programming Module Instruction Sheet DS51280 On-line help (Help>Topics) is also available for this tool: * Debuggers>MPLAB ICD 2 hlpMPLABICD2.chm ----------------------------------------------------------------- 4. What's New/Updated ----------------------------------------------------------------- - Preserve EEPROM data memory during programming. - Many PIC18F SFR's previously reserved have been made accessible. ----------------------------------------------------------------- 5. USB Port Setup ----------------------------------------------------------------- Execute the file specified below and follow the instructions in the html text to set up the device driver: C:\Program Files\Microchip\MPLAB IDE\ICD2\Drivers\.htm where .htm varies depending on your PC OS: Win 98: ddicd298.htm Win ME: ddicd2me.htm Win 2000/XP: ezicd2.htm ----------------------------------------------------------------- 6. Powering the MPLAB ICD 2 and Target Board ----------------------------------------------------------------- NOTE: MPLAB ICD 2 must be powered BEFORE power is applied to the target application. MPLAB ICD 2 Power ----------------- - Serial (RS-232) connection to the PC: Power supply required. - USB connection to the PC, target not powered from MPLAB ICD 2 or no target connected: No power supply needed. - USB connection to the PC, target powered from MPLAB ICD 2: Power supply required. (USB cannot power both.) Note: Plug in USB first, then power supply. The MPLAB ICD 2 cannot be powered from the target board. Target Board Power ------------------ The MPLAB ICD 2 can provide 5 V and up to 200 mA to a target if the ICD itself is powered by a power supply. (USB cannot power both.) This is enabled by checking "Power target circuit from MPLAB ICD 2" (Debugger>Settings, Power tab). Note: Plug in USB first, then power supply. ----------------------------------------------------------------- 7. Setting Up the MPLAB ICD 2 and Target Board ----------------------------------------------------------------- Powering the Target Board from the MPLAB ICD 2 ---------------------------------------------- 1. Power the MPLAB ICD 2. DO NOT power the target. 2. Start MPLAB IDE. 3. Under the Debugger menu of MPLAB IDE, click Connect. 4. After establishing communications with the MPLAB ICD 2, select Debugger>Settings. 5. In the Settings dialog, click the Power tab and ensure that the check box for "Power target circuit from MPLAB ICD 2" is checked. Click OK. 6. Now you should be able to erase and program components with the MPLAB ICD 2. Powering the Target Board from its own power supply --------------------------------------------------- 1. Power the MPLAB ICD 2. DO NOT power the target. 2. Start MPLAB IDE. 3. Under the Debugger menu of MPLAB IDE, click Connect. 4. After establishing communications with the MPLAB ICD 2, select Debugger>Settings. 5. In the Settings dialog, click the Power tab and ensure that the check box for "Power target circuit from MPLAB ICD 2" is NOT checked. Click OK. 6. Power the target system and then Select Debugger>Connect. 7. Now you should be able to erase and program components with the MPLAB ICD 2. Self Tests ---------- If any of the self tests on the Status tab of the Settings dialog do not say pass, you will not be able to erase and program your device. Exception: if Vpp says low, you may still be able to program if the voltage is more than the low value for the device programming range listed in the device programming spec. Generally, failed self tests will require further troubleshooting. See on-line help for more information. ----------------------------------------------------------------- 8. PIC18C601/801 Users ----------------------------------------------------------------- There is a folder called \ICD2 that was copied into the MPLAB IDE installation directory. This folder has two files which can be used with the PICDEM(tm) 18R demo board (DM163006): SRAM16.HEX - allows program download to the static RAM 29F16016.HEX - allows program download to the flash memory When using PICDEM 18R, you must use one of the files above in the "Location of WriteProgramWord and EraseProgramMemory" dialog on the MPLAB ICD 2 Advanced Dialog. Also, you must remember to do an erase before programming as this is not done automatically. For your own design, which probably has different programming algorithms for the memory on your target, you must substitute your own memory read/write routine in order for the MPLAB ICD 2 to download code. See the PICDEM 18R documentation for information on writing your custom routines. These code routines will be used to program your memory and care must be taken to ensure they are relocatable and comply with the format used in the included source files. ----------------------------------------------------------------- 9. Known Problems ----------------------------------------------------------------- The following is a list of known problems. For information on common problems, error messages and limitations, please see Troubleshooting in the online help file for MPLAB ICD 2 (hlpMPLABICD2.chm). SSR = System Service Request * Communications * General Issues * SSR's Communications -------------- - If you are using MPLAB ICD 2 with USB communications AND a power supply, plug in the USB first, then power supply. - If you have problems with serial communications, see the Troubleshooting section in the help file. NOTE: You should have the FIFO disabled and hardware handshaking enabled on the PC COM port properties. - Select Start>Settings>Control Panel - Double-click on System to open System Properties - Open the Device Manager and find your COM port under Ports - Open the Communications Port Properties dialog for this port - Under Port Settings, choose "Flow Control: Hardware" for hardware handshaking - Open the Advanced Settings dialog and deselect Use FIFO buffers - When first connecting to MPLAB ICD 2 using serial communications, the default COM port is COM1. If you are using the MPLAB ICD 2 on another COM port, Select Debugger>Settings, Communication tab to set the appropriate COM port. Subsequent connections should be established quickly. - Check the MPLAB ICD 2 module revision number (10-00319-Rx, where x is the revision number) if you are having communications problems. If you have R9 through R11 and do not have an "ECO 2037" sticker on your module, adding a 4.7k ohm resistor between the target RB7 and ground should fix the communication issue. - If you do not use the included cable, make sure the cable you use is not longer than the included cable or communication errors could result. - Do not plug both the USB cable and RS-232 cable into the MPLAB ICD 2 pod. This will cause errors. Choose one form of ICD-to-PC communication. General Issues -------------- - Using the USB connection on a laptop PC with suspend mode enabled will lock up the MPLAB ICD 2 if suspend mode is entered. Unplug the USB cable from the MPLAB ICD 2 and then plug the cable back in to resume debugging. You may want to disable suspend mode while using the MPLAB ICD 2. From Control Panel, select Power Options and disable suspend mode. - Care should be taken when programming the PLL. The PLL only changes when power is first applied to the chip. If you are programming the PLL for the first time, remove power from the PIC18Fxxxx part after programming and reapply for the PLL to be enabled. If you are reprogramming the device from PLL mode to another mode, first reprogram with PLL off, then remove power and reapply. - If you have trouble when low voltage programming, add a pull-down 10k ohm resistor to RB5. - Numbers in the start and end address boxes (Debugger>Settings, Program tab) must use the hex numbering convention (0x....). - For PIC18F8720, MEMCON cannot be read if in a microcontroller mode. This is a silicon issue. - You may not be able to enter debug mode if power-up timer is enabled for the following devices: * PIC18F4620/4610/2620/2610 * PIC18F4680/2680/4681/2681 * PIC18F4550/2550/4455/2455 * PIC18F8490/8410/6490/6410/8390/8310/6390/6310 - For dsPIC30F device programming, the Universal Programming Module cannot be used. - MPLAB ICD 2 may not operate on a dual processor platform in dual processor mode. It is recommend that you change the application properties for MPLAB ICD 2 to single processor mode. SSR's ----- SSR 20230: Programming or reading a code-protected EEPROM memory generates no messages by MPLAB IDE for MPLAB ICD 2 for a PIC12F675 device. SSR 21119: Cannot program the external memory in the PIC18F8720 family. SSR 21163: Programmer function: Cannot program PIC16F87x devices in individual or in combinations of the memory areas without the entire device being automatically erased. SSR 21985: PCL register not displayed correctly. SSR 22537: Cannot reset while running. SSR 22683: Blank check fails after performing an erase on a dsPIC30F6014 a2 device. Works OK for dsPIC30F6014 b0 device. SSR 22835: When using XT mode with a canned oscillator, you receive the warning, "Target not in debug mode", the debugger will not work. Either select EC mode to use the oscillator or use a crystal for XT mode. SSR 24354: Freeze peripherals on Halt is checked and grayed, but some peripherals do not freeze. This is a silicon issue. SSR 24627: Lack of a device not detected on Erase; Erase appears successful. To detect no device, do a Blank Check following an Erase. SSR 24936: For dsPIC30F devices, do not use power (Vdd) from ICD unit. The power (Vdd) provided from MPLAB ICD 2 to the target device is not sufficient for all programming operations of the dsPIC30F device family. It is recommended that you provide power on your own board and not to use power from the ICD. SSR 26429: PIC16F913/914: Debug mode works up to 18MHz. SSR 26433: PIC16F913/914: After selecting Clear All Memory (Debugger>Clear Memory>All Memory), MPLAB ICD 2 loses communications with device. ----------------------------------------------------------------- 10. Important Notes ----------------------------------------------------------------- - If you modify Program Memory, you must reprogram the device. - When running in debug mode, selecting Debugger>Reset resets the program, goes to the zero location, and halts. The program does not automatically re-run. - While single stepping, the MPLAB ICD 2 will not respond to interrupts. - The SLEEP instruction cannot be used when debugging. - The WDT cannot be used when debugging. - USB hubs must be powered. - When working with PIC18XXXX parts, debugging speed is improved (breakpoints, single-step, etc.) if the General Purpose File Register Window is closed. You can put any registers that need to be monitored into a Watch Window, or view Special Function Registers in the SFR Window. MPLAB IDE updates information in visible sections of windows only, unless otherwise specified. Therefore, the smaller the visible area, the faster the updates and debugging speed. - For PIC18Fxx20 devices, you must connect the AVDD and AVSS pins for the devices to program. - Make sure that table reads/writes are not code protected. - In low voltage mode, bulk erase will not erase code protect bits. - MPLAB ICD 2, by design, has limited debug capabilities when compared with an emulator. This is a price/feature trade-off. If you need more complex debugging capabilities, the MPLAB ICE 2000 for PICmicro device emulation and the MPLAB ICE 4000 for PIC18 and dsPIC device emulation are suggested. Firmware -------- - MPLAB ICD 2 has different OS's for different part families. The ICD will, by default, automatically download the correct OS as necessary. - It is possible to turn off the automatic download feature in Settings>Status. You will then be asked in a dialog if you wish to download the OS. Disabling the automatic download feature is NOT RECOMMENDED. Serious errors may occur if your OS is not correct for your selected device. It is recommended that you download the MPLAB ICD 2 firmware that was packaged with the version of MPLAB IDE being used on your system. dsPIC30F Devices ---------------- 1) RB0 AND RB1 PINS: IF MPLAB ICD 2 IS SELECTED AS A DEBUGGER, IT INITIALIZES ALL THE A/D INPUT PINS - AN0 (RB0) THROUGH AN15 (RB15) PINS - AS "DIGITAL" PINS, BY SETTING ALL 16 BITS IN THE "ADPCFG" REGISTER. (A) IF YOU HAVE SELECTED A PAIR OF "DEBUG PINS" (EMUD/EMUC, EMUD1/EMUC1, EMUD2/EMUC2 OR EMUD3/EMUC3) THAT ARE MULTIPLEXED WITH A/D INPUT PIN FUNCTIONS ON THE PARTICULAR dsPIC30F DEVICE BEING USED, THEN YOU MUST NEVER CLEAR THE BITS IN THE "ADPCFG" REGISTER THAT CORRESPOND TO THOSE A/D PINS. FOR EXAMPLE, IF EMUD3 AND EMUC3 ARE USED AS THE DEBUG PINS ON A dsPIC30F2010 DEVICE, THEN BITS 0 AND 1 OF THE ADPCFG REGISTER MUST REMAIN SET AT ALL TIMES. SIMILARLY, IF EMUD AND EMUC ARE USED AS THE DEBUG PINS ON A dsPIC30F5011 DEVICE, THEN BITS 6 AND 7 OF THE ADPCFG REGISTER MUST REMAIN SET AT ALL TIMES. IN SUCH CASES, YOU MUST ALSO TAKE PROPER PRECAUTION TO ISOLATE THE APPLICATION CIRCUITRY FROM THE CORRESPONDING A/D PINS DURING DEBUGGING. (B) IF YOUR APPLICATION NEEDS TO USE CERTAIN A/D PINS AS ANALOG INPUT PINS, THEN YOUR CODE MUST CLEAR THE CORRESPONDING BITS IN THE "ADPCFG" REGISTER DURING A/D MODULE INITIALIZATION. FOR EXAMPLE, IF AN4 AND AN5 ARE REQUIRED AS ANALOG INPUT PINS, THEN BITS 4 AND 5 OF THE ADPCFG REGISTER MUST BE CLEARED. 2) After programming a device, you must perform a Processor Reset. This can be done either by selecting the Debugger>Reset>Processor Reset command, pressing the F6 hotkey or clicking on the Processor Reset button. This ensures that the device oscillator is active before the program is run or debugging operations are performed. 3) User RAM Usage: You must not use the following memory region while using MPLAB ICD 2; 0x800 - 0x84F (i.e., the first 80 bytes of RAM). If the ICD is to be used for a particular project, open the "Project>>Build Options>>Linker" dialog box and check the "Link for ICD2" check-box. 4) File Registers / Special Function Registers / Watch window: (a) It is recommended not to scroll the File Registers window up or down. This may generate a Warning message. The busy message that occurs at the output window indicates the MPLAB ICD 2 is yet to complete the previous data fill request and is thus not ready to execute the current scroll request. To avoid this message, either keep the window small, or use the Go To dialog, which can be accessed by right-clicking on the File Registers window or pressing Ctrl+G. (b) For viewing a small number of variables or Special Function Registers, it is recommended to use the Watch window rather than the File Registers, in order to avoid data transfer delays (especially during single-step). 5) Programming Range: On enabling MPLAB ICD 2, the Program End Address (Debugger>> Settings>>End Address) is automatically set as low as possible based on the Program Memory usage of each MPLAB IDE project. This helps minimize the programming time. 6) SLEEP, IDLE, WDT, Clock Switching: For dsPIC devices, debug operations can be executed on programs which use SLEEP or IDLE mode, Watchdog Timer, and/or Clock Switching. 7) Debug during SLEEP or IDLE Mode: When the device is in SLEEP and IDLE mode and a Halt command is issued, MPLAB ICD 2 will wake up the device and halt execution on the instruction immediately following the PWRSAV instruction. 8) Interrupts: (a) In general, single-stepping an instruction will not generate an interrupt or trap, because the corresponding interrupt/trap status flag bit would not get set. Essentially, the interrupt or trap condition would be ignored. (b) However, if the user has explicitly set an interrupt/trap flag bit, either in the user program or by modifying the status flag values in the MPLAB Watch, SFR or File Registers window, then the interrupt/trap would get generated, and the user would be able to single-step into the Interrupt or Trap Service Routine. 9) Break Point Behavior: If a break point is set on an instruction that follows a taken branch, the Breakpoint will be triggered even though the branch went elsewhere. 10) Break Point Behavior and Skidding: It is possible that a breakpoint halt will exhibit program memory skidding in that the execution stops N instructions after reaching the breakpoint. The following definitions are provided and referred to: (a) One skid - A breakpoint occurs AFTER the instructions is executed (PC+2) (b) Two skid - A break point occurs AFTER the NEXT instruction (PC+4) Break Point Behavior: 1) If a Non-Program-Flow, modifying, Single-Word, Two-Cycle instruction (such as Table or PSV) precedes a break point instruction, then the breakpoint occurs BEFORE the instruction at the breakpoint address is executed (ONE SKID). 2) All other instructions have a "TWO SKID", which means the break occurs AFTER the NEXT instruction is executed. 11) The CAN module, unlike the other peripherals, does not get frozen in the following situations: (a) during a Halt (b) during a stop on a Breakpoint (c) after a Single-Step For example, if you set a Breakpoint and run to it, the CAN module continues to run in the background, and it may seem that data transmissions and receptions have completed immediately. 12) DISICNT register: In five dsPIC30F devices (dsPIC30F6010, dsPIC30F6011, dsPIC30F6012, dsPIC30F6013 and dsPIC30F6014), since the DISICNT register continues to decrement even when the device is halted by the debugger, the DISICNT value will always be seen as 0x0000 in the Watch, SFR and File Registers windows. To monitor the DISICNT value, add code to copy the DISICNT register contents to a W register or memory location and monitor the value of the corresponding W register or memory location in the Watch, SFR or File Registers window. 13) ADCMD bit in PMD1 register: The user application must not set the ADCMD bit (bit 0 of PMD1 register). This would lead to incorrect ICD operation. 14) SPLIM register: If using MPLAB ICD 2 as a Debugger, your software must initialize the Stack Pointer Limit register (SPLIM) before using the stack. 15) Single-stepping a DO loop: In five dsPIC30F devices (dsPIC30F6010, dsPIC30F6011, dsPIC30F6012, dsPIC30F6013 and dsPIC30F6014), single-stepping through a DO loop in dsPIC30F assembly code results in the loop getting executed one less time than expected. 16) Firmware Download: If MPLAB ICD 2 is not actually hooked up to a dsPIC board, then the debugger will (by default) assume that you need to use a Rev A3 device. As a result, MPLAB ICD 2 will then download (or prompt for a download if Automatic Download is disabled) the firmware for Rev A3 devices. Then, if a board with a Rev B1 device is connected to MPLAB ICD 2, it will detect the Rev B1 device and will download the firmware for Rev B1 devices. Alternatively, if a board with a Rev A3 device is connected to MPLAB ICD 2, it will detect the Rev A3 device and no firmware download will be performed (since the firmware for Rev A3 devices has already been downloaded). 17) Multiple Breakpoints: Up to two breakpoints may be enabled simultaneously on dsPIC30F5011/5013 and dsPIC30F6010/6011/6012/6013/6014 devices. 18) Pass Counter feature in Advanced Breakpoints: For a specified Pass count of 'N', the code will break after 'N+1' occurrences of the breakpoint instead of 'N' occurrences. 19) If you need to use the Fail-Safe Clock Monitor feature on a dsPIC device when using the MPLAB ICD 2 for debugging your application, a Watchdog Timer Device Reset will occur, even if the Watchdog Timer has not been explicitly enabled in the application. To work around this issue, use the "CLRWDT" instruction in the main loop of your application code. This will ensure that the Watchdog Timer gets cleared before it causes the device to reset. ----------------------------------------------------------------- 11. Universal Programming Module (AC162049) ----------------------------------------------------------------- MPLAB IDE Support ----------------- Supported on MPLAB IDE v6.xx and greater. Jumper Select for Programmer Function ------------------------------------- The Universal Programming Module (UPM) allows the MPLAB ICD 2 to be used as a device programmer for supported product DIP packages. In-Circuit Serial Programming (ICSP) signals from the MPLAB ICD 2 are routed to seven wires soldered to the UPM at J3. J3 Connector ------------------- Vpp - Program Power Vdd - Power Vdd - Power GND - Ground GND - Ground PGD - Program Data PGC - Program Clock You then jumper these wires to the appropriate pins of the 40-pin header, comprised of pins 1-20 and pins 21-40, which correspond to the pins of the ZIF socket (U1). For information on which pins to jumper, please refer to the programming specification for the device you will be programming. Devices should be aligned to the top of the ZIF socket (pin 1 of all devices should be aligned to pin 1 of the ZIF socket). Refer to the device's data sheet for pinouts. Both programming specifications and data sheets may be found on our website or on the MPLAB IDE CD-ROM. Setting up the UPM in MPLAB IDE ------------------------------- Make sure that the programmer options are correct for your target device. - Make sure the MPLAB ICD 2 is connected (Programmer>Connect). - Select 'Programmer>Settings' and select the 'Power' tab. - Check the 'Power target circuit from MPLAB ICD 2' box, and press the 'Apply' button. Ensure that 'Target Vdd' is at least 4.5v (press the 'Update' button if necessary) - Select the 'Program' tab of the ICD Programmer Properties dialog box. Configure your target device as desired. Press 'OK' when done. Programmer operations are now available. Insert the device to be programmed into the UPM ZIF socket and connect the signals wires per the previous section. ----------------------------------------------------------------- 12. Reserved Resources ----------------------------------------------------------------- Due to the built-in in-circuit debugging capability of ICD devices, and the ICSP function offered by the Debugger, the MPLAB ICD 2 uses on-chip resources when debugging, i.e., some device resources are reserved for use by MPLAB ICD 2. Refer to the on-line help for the most up-to-date list of resources used by the MPLAB ICD 2.