MPLAB ICD2 MPLAB ICD2 PIC MPLAB-IDE V6.0 ICD2 usb PC RS232 MPLAB IDE PC PC 2.0 5.5V LED EEDATA MPLAB ICD2 Microchip MPLAB-IDE v6.0 Windows 95/98 Windows NT Windows 2000 www.elc-mcu.com 1
ICD2...4 1.1 ICD2...4 1.2 ICD2...4 1.3...6 1.4...9...9 ICD2...9 3.1...9 3.2 ICD2...9 3.2.1...9 3.2.2...10 3.2.2.1...10 3.2.2.2...10 3.2.2.3...10 3.2.2.4...11 3.2.2.5...12 3.2.3 CONFIG...12 3.2.4...12 3.3...13 3.3.1...13 3.3.2...13 3.4 ICD2...14 3.4.1...14 3.4.1.1...14 3.4.1.2...14 3.4.1.3...14 3.4.2...15 3.4.2.1...15 3.4.2.2...15 3.4.2.3...15 3.5...16 3.5.1...16 3.5.2...16 3.5.3...16 3.5.4...16 ICD2...17 4.1 ICD2...17 4.1.1...17 4.1.2...17 4.1.2.1...17 4.1.2.2...17 4.1.2.3...17 4.1.2.4...17 4.1.2.5...17 4.1.3 CONFIG...17 4.2...18 4.3...18...18 www.elc-mcu.com 2
ICD2 1.1 ICD2 ICD2 ICD2 1 MPLAB ICD2 MPLAB IDE 2 RS232 1.2 ICD2 ----------------------------------------------------------------- MPLAB IDE V6.62) ----------------------------------------------------------------- -------- dspic30f2010 PIC16F747 PIC18F2439 PIC18F4539 dspic30f2011* PIC16F767 PIC18F2455* PIC18F4550* dspic30f2012* PIC16F777 PIC18F248 PIC18F458 dspic30f3012* PIC16F818 PIC18F2510* PIC18F4585* dspic30f3013* PIC16F819 PIC18F2515* PIC18F4610* dspic30f3014* PIC16F87 PIC18F252 PIC18F4620* dspic30f4011 PIC16F870 PIC18F2520* PIC18F4680* dspic30f4012 PIC16F871 PIC18F2525* PIC18F4681* dspic30f4013* PIC16F872 PIC18F2539 PIC18F6310* dspic30f5011 PIC16F873 PIC18F2550* PIC18F6390* dspic30f5013 PIC16F873A PIC18F258 PIC18F6410* dspic30f6010 PIC16F874 PIC18F2585* PIC18F6490* dspic30f6011 PIC16F874A PIC18F2610* PIC18F6520 dspic30f6012 PIC16F876 PIC18F2620* PIC18F6525 dspic30f6013 PIC16F876A PIC18F2680* PIC18F6585 dspic30f6014 PIC16F877 PIC18F2681* PIC18F6620 PIC12F629! PIC16F877A PIC18F4220 PIC18F6621 PIC12F635! PIC16F88 PIC18F4320 PIC18F6680 PIC12F675! PIC16F916* PIC18F4331 PIC18F6720 PIC12F683 PIC16F917* PIC18F4410* PIC18F8310* PIC16F627A! PIC18C601 PIC18F442 PIC18F8390* PIC16F628A! PIC18C801 PIC18F4420* PIC18F8410* PIC16F630! PIC18F1220 PIC18F4431 PIC18F8490* PIC16F636! PIC18F1320 PIC18F4439 PIC18F8520 PIC16F639* PIC18F2220 PIC18F4455* PIC18F8525 PIC16F648A! PIC18F2320 PIC18F448 PIC18F8585 PIC16F676! PIC18F2331 PIC18F4510* PIC18F8620 PIC16F684! PIC18F2410* PIC18F4515* PIC18F8621 PIC16F688! PIC18F242 PIC18F452 PIC18F8680 PIC16F716! PIC18F2420* PIC18F4520* PIC18F8720 PIC16F737 PIC18F2431 PIC18F4525* ---------- dspic30f2010 PIC16F648A PIC18F2320 PIC18F4520* dspic30f2011* PIC16F676 PIC18F2331 PIC18F4525* dspic30f2012* PIC16F684 PIC18F2410* PIC18F4539 dspic30f3012* PIC16F688 PIC18F242 PIC18F4550* www.elc-mcu.com 3
dspic30f3013* PIC16F716 PIC18F2420* PIC18F458 dspic30f3014* PIC16F73* PIC18F2431 PIC18F4585 dspic30f4011* PIC16F737 PIC18F2439 PIC18F4610* dspic30f4012* PIC16F74* PIC18F2455* PIC18F4620 dspic30f4013* PIC16F747 PIC18F248 PIC18F4680 dspic30f5011 PIC16F76* PIC18F2510* PIC18F4681* dspic30f5013 PIC16F767 PIC18F2515* PIC18F6310* dspic30f6010 PIC16F77* PIC18F252 PIC18F6390* dspic30f6011 PIC16F777 PIC18F2520* PIC18F6410* dspic30f6012 PIC16F818 PIC18F2525* PIC18F6490* dspic30f6013 PIC16F819 PIC18F2539 PIC18F6520 dspic30f6014 PIC16F87 PIC18F2550* PIC18F6525 PIC10F200!! PIC16F870 PIC18F258 PIC18F6585 PIC10F202!! PIC16F871 PIC18F2585 PIC18F6620 PIC10F204!! PIC16F872 PIC18F2610* PIC18F6621 PIC10F206!! PIC16F873 PIC18F2620 PIC18F6680 PIC12F508 PIC16F873A PIC18F2680 PIC18F6720 PIC12F509 PIC16F874 PIC18F2681* PIC18F8310* PIC12F629 PIC16F874A PIC18F4220 PIC18F8390* PIC12F635 PIC16F876 PIC18F4320 PIC18F8410* PIC12F675 PIC16F876A PIC18F4331 PIC18F8490* PIC12F683 PIC16F877 PIC18F4410* PIC18F8520 PIC16F505 PIC16F877A PIC18F442 PIC18F8525 PIC16F54 PIC16F88 PIC18F4420* PIC18F8585 PIC16F57 PIC16F916* PIC18F4431 PIC18F8620 PIC16F59 PIC16F917* PIC18F4439 PIC18F8621 PIC16F627A PIC18C601 PIC18F4455* PIC18F8680 PIC16F628A PIC18C801 PIC18F448 PIC18F8720 PIC16F630 PIC18F1220 PIC18F4510* PIC16F636 PIC18F1320 PIC18F4515* PIC16F639* PIC18F2220 PIC18F452 *! ICD2!! PIC10F2XX Microchip 1.3 MPLAB ICD 1 www.elc-mcu.com 4
1 ICD ICD ICD2 40Pin DIP 1 6 ICD ICD2 2 40Pin IC PIC ICD2 8Pin PIC12F629/675/683 ICD ICD PIC16F877 PIC16F87X 2 2 8Pin 14Pin PIC16F630/676 PIC12F635, PIC16F636 PIC16F684 PIC16F688 3 www.elc-mcu.com 5
3 14Pin 18Pin PIC16F627A/628A/648A PIC16F716 4 4 18Pin DEMO40 DEMO40 A/D 0 5V 4 LCD RB 4 4 www.elc-mcu.com 6
LED 4 LED CPU PIC16F877A SPI 74HC595 LED ST7920A GXM12232E 8192 16X16 128 16X8 64x256 GDRAM 256 ICON RAM LCD D/A MAX518 PIC16F877A IIC D/A MAX232 PIC16F877A SCI RS232 PC PWM 32.768KHz 1 EEPROM EEPROM 93C46 PIC16F877A SPI 4 ICD ICD1 ICD2 DEMO40 28 40Pin DIP 6 1.4 6 ICD2 5 5 ICD2 6 2.1 MPLAB-IDE ICD2 MPLAB-IDEV6.XX Microchip ICD2 MPLAB-IDE6.62 V6.62 MPLAB6.62.EXE www.elc-mcu.com 7
HI-TECH PICC ME16 C HI-TECH PICC Suite ICD2 3.1 1 RS232 PC ICD2 2 6 ICD2 3 4 ICD2 ICD2 2 3 6 ICD2 3.2 ICD2 3.2.1 Configure->Select Device 6 6 Microchip Programmer Tool Support Microchip Debugger Tool Support Microchip 1 2 3 OK 3.2.2 3.2.2.1 ICD2 MPLAB IDE Debugger->Select Tool MPLAB ICD2 www.elc-mcu.com 8
MPLAB IDE usb RS232 ICD2 Connecting to MPLAB ICD 2 ICD0019: Failed to open communications: Non-existent port ICD0021: Unable to connect with MPLAB ICD 2ICD0021: Unable to connect with MPLAB ICD 2 MPLAB ICD 2 Ready 3.2.2.2 Debugger->Settings ICD Debugger Communication Port COM Baud Rate 7 7 ICD2 MPLAB IDE ICDWarn0030: ICD2 is about to download a new operating system...downloading Operating System ICD2 ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled. FIFO FIFO ICD2 Target Device **** found ICDWarn0020:Invaild target device id.. 6 3.2.2.3 ICD Debugger Program Select Memories ID www.elc-mcu.com 9
Program Memory Address 0x10 ICD2 255 3.2.2.4 ICD2 Power target circuit from MPLAB ICD2 Debugger Power 9 500 Power target circuit from MPLAB ICD2 ICD2 Update Vdd Vpp www.elc-mcu.com 10
3.2.2.5 ICD Debugger Status Warning Limitation ICD2 Versions ICD Debugger ICD Debugger X 3.2.3 CONFIG CONFIG Configure->Configuration Bits Configuration Bits 10 10 Configuration Setting ICD2 Low Voltage Program Code Protect ICD2 3.2.4 C Project->Set Language Tool Locations Set Language Tool Locations HITECH PICC Executables 11 www.elc-mcu.com 11
11 PICC Assembler PICC Complier PICC Linker C:\HT-PIC\bin\picc.exe PC HITECH PICC 3.3 3.3.1 MPLAB IDE Project->New Project Project Name Browse OK mcp 3.3.2 *.mcw *.mcp Source Files Head Object Files Library Files 12 www.elc-mcu.com 12
12 Add Files 3.4 ICD2 3.4.1 3.4.1.1 Debugger->Connect Output MPLAB ICD2 Target Device **** found revision=** 13 ICDWarn0020:Invaild target device id.. 6 13 3.4.1.2 Project->Build All Output Build.hex www.elc-mcu.com 13
3.4.1.3 Output Build.hex CONFIG Config MCLR 3.4.2 ICD2 3.4.2.1 ICD2 Run Halt ICD2 Flash ICD2 -> Step Into Step Over CALL Reset PC C PC main() 3.4.2.2 RAM ICD2 3.4.2.3 View->Watch Watch 14 14 Add SFR Add SFR Add Symbol Watch1 ~ Watch4 4 www.elc-mcu.com 14
ICD2 EEPROM View 3.5 MPLAB ICD2 ICD2 MPLAB-IDE ICD2 3.5.1 ICD2 1 2 ICD2 3 4 MPLAB-IDE IDE 5 3.5.2 ICD2 1 SLEEP 2 WDT 3 4 3.5.3 PIC12F629/675 PIC16F630/676 1 2 MCLR 3 GP1/RA1 4 GPIO PIC18FXXX 1 00 8 00 8 0x10 0x12 0x1F 0x14 2 PICXX20 AVDD AVSS 3.5.4 MPLAB ICD2 1 MCLR 2 2 3 RAM ICD2 ICD2 4.1 ICD2 4.1.1 Configure->Select Device Microchip Programmer Tool Support Microchip www.elc-mcu.com 15
1 2 3 OK 4.1.2 4.1.2.1 ICD2 MPLAB IDE Programmer->Select Programmer MPLAB ICD2 Connecting to MPLAB ICD 2 ICD0019: Failed to open communications: Non-existent port ICD0021: Unable to connect with MPLAB ICD 2ICD0021: Unable to connect with MPLAB ICD 2 MPLAB ICD 2 Ready MPLAB USB com ICD2 Target Device **** found ICDWarn0020:Invaild target device id.. 6 4.1.2.2 MPLAB ICD 2 Settings Program 4.1.2.3 MPLAB ICD 2 Settings Power Power target circuit from MPLAB ICD2 ICD2 Update Vdd Vpp 4.1.2.4 MPLAB ICD 2 Settings a) Status b) Warning c) Limitation ICD2 d) Versions MPLAB ICD 2 Settings MPLAB ICD 2 Settings X 4.1.3 CONFIG CONFIG Configure->Configuration Bits Setting Low Voltage Program 4.2 (.hex ) File->Import hex Programmer->Read CONFIG 4.3 www.elc-mcu.com 16
Programmer Program Read 0 Verify Erase Part Blank Check 6.1.01 ICDWarn0020:Invaild target device id.. 6.1.02 ICDWarn0019 Debug mode is not enabled.. 6.1.1 5 PGC PGD VPP PICmicro PICmicro AVSS AVPP 6.1.2 ICD MPLAB ICD 2 8 6 I/O 3 bond-out PICmicro bond-out PICmicro MPLAB ICD 2 MPLAB ICD 2 ICD 2 bond-out PICmicro bond-out PICmicro ICD ICD 2 VPP PGC PGD MPLAB ICD 2 6.1.3 MPLAB ICD 2 MPLAB ICD 2 LED USB PC RS-232 MPLAB ICD 2 USB USB USB Windows MPLAB ICD 2 USB USB USB MPLAB ICD 2 6.1.4 ICD 2 Target not in debug modeerror. MPLAB ICD 2 Debugger>Program PICmicro Background Debug Config>Configuration Bits... 6.1.5 MPLAB ICD 2 PICmicro VDD 2V MPLAB ICD 2 / / www.elc-mcu.com 17
VDD MPLAB ICD 2 FLASH MPLAB ICD 2 Settings VDD From Target 6.1.6 MPLAB ICD 2 LVP VDD MPLAB ICD 2 VPP +12V 6.1.7 PLL MPLAB ICD 2 PICmicro PLL PICmicro PLL PLL 6.1.8 Add New Hardware No, the device isn t in the list. No, I want to select the hardware from a list. UniversalSerial Bus Controller, Have Disk... 6.1.9 MPLAB ICD 2 MPLAB ICD 2 MPLAB ICD 2 MPLAB ICD 2 6.1.10 MPLAB ICD 2 PICmicro MPLAB ICD 2 6.1.11 EEDATA MPLAB ICD 2 EEDATA EECON TABLRD MPLAB MPLAB ICD 2 EEDATA 6.1.12 Erase All Before Programming FLASH bank 6.1.13 MPLAB ICD 2 Port B GPIO? PGC PGD MPLABICD 2 PORT B PGC PGD Port B PGC PGD 6.1.14 6.1.15 PIC12F629/675 PIC16F630/676 MPLAB ICD 2 GP1/RA1 MPLAB ICD 2 Header DS51292 ICD 2 6.1.16 LED MPLAB ICD 2 MPLAB ICD 2 Power Busy LED Self Test MCLR=VPP 1 VPP 7-8V MPLAB ICD 2 6.1.17 MPLAB ICD 2 Self Test Self Test MPLAB ICD 2 VDD, Power from ICD2 MPLAB 2 VDD 5 V Power from target www.elc-mcu.com 18
VDD 2 6V Pass/Fail Advanced Power VDD / VPP MPLAB ICD 2 VPP/MCLR VPP Pass/Fail VPP/MCLR MCLR=Gnd MPLAB ICD 2 VPP/MCLR Pass/Fail VPP/MCLR 00 = Pass VDD 01 = Min error VDD 80 = Max error VDD 00 = Pass VPP 01 = Min error VPP 80 = Max error VPP 00 = Pass VPP/MCLR 80 = Max error VPP/MCLR MCLR=VDD Run MPLAB ICD 2 VDD VPP/MCLR Pass/Fail Advanced Power VDD / MCLR=VPP MPLAB ICD 2 VPP VPP/MCLR Pass/Fail VPP/MCLR 6.1.18 RETFIE W STATUS BSR CALL FAST MPLABICD 2 MPLAB ICD 2 CALL FAST RETURN FAST RETFIE 00 = Pass VDD VPP/MCLR 01 = Min error VDD VPP/MCLR 80 = Max error VDD VPP/MCLR 00 = Pass VPP VPP/MCLR 01 = Min error VPP VPP/MCLR 80 = Max error VPP VPP/MCLR 6.1.19 0001 0000 MPLAB ICD 2 0000 0001 0000 NOP 6.1.20 MPLAB IDE MPLAB ICD 2 6.1.21 PICmicro www.elc-mcu.com 19