Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with MPLAB ICD 2.

Status
Not open for further replies.

petarpav

Full Member level 5
Joined
Mar 25, 2002
Messages
299
Helped
13
Reputation
26
Reaction score
5
Trophy points
1,298
Activity points
2,172
programming debugexecutive fails with icd2

Hi. I buld ICD-2 and test is passed but when I try to program target and debug, program is ok, but icd can't connect to debug executive:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC18F452 found, revision = Rev 0x5
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
...Erasing Part
...Programming Program Memory (0x0 - 0x317F)
...Loading DebugExecutive
...Programming DebugExecutive
...Programming Debug Vector
...Programming RSBUG
Verifying...
...Program Memory
...Debug Executive
...Debug Vector
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
Connecting to debug executive
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0275: Programming failed.
MPLAB ICD 2 Ready

Pls. HELP!
 

mplab configuration bits problem

Hi. PLEASE HELP! :( :( :(
I also receive log like that:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC18F452 found, revision = 0x5
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
...Erasing Part
...Programming Program Memory (0x0 - 0x30CF)
...Loading DebugExecutive
...Programming DebugExecutive
...Programming Debug Vector
...Programming RSBUG
Verifying...
...Program Memory
...Debug Executive
...Debug Vector
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
Connecting to debug executive
ICD0082: Failed MPLAB ICD 2 operation
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC18F452 found, revision = 0x5
...Reading ICD Product ID
Running ICD Self Test
...Passed
ICD0275: Programming failed.
MPLAB ICD 2 Ready
 

site:www.edaboard.com pic18f452 fuses

You said, you built it by yourself...
Are you sure of
- using the correct firmware for the used PIC (16F877/16F877A) [seems to be, because bootloader works, but doublecheck it...]
- your circuit works? - When programming is not possible, you might want to check if the programming voltage is correct (about 13V needed). [but should also be ok, because selftest passed]
- the most propable: Did you enable DEBUG support on the target? (DEBUG_ON flag in the config-line)
 

fail when connecting to debug executive

Hi, stegr.
What you mean "Did you enable DEBUG support on the target? (DEBUG_ON flag in the config-line)"
What "config-line"(where is it)?

Thanks.
 

you have a so called configuration line.
This line is a combination of fuses (see data sheet) that will be written into the configuration register.
In assembler you write something like this:

__config WDT_OFF & BODEN & HS & DEBUG_ON & LVP_OFF

The names of the defines may be different.
In the above example, the configuration-register would mean the following:
- Watchdog is disabled
- Burn Out Reset is enabled
- High Speed oscillator mode
- Debug on
- Low Voltage Programming off

Just take a look at the data sheet...

EDIT: I forgot the where...
In assembler it is at the top of your program (after the includes).
According to Microchip it should be the first byte of the asm-file and will be the last byte of the hex-file.

In C it is dependent on your compiler. Some compilers don't even need a configuration-line (or word if you prefer to call it so) but you need to take a look at the manual of you compiler to find the option to enable debugging...

Debugging enabled generates some special code that you don't want to have in productional use, but that is needed for in-circuit-debugging. So you have to enable it explicitely.

Mplab might also have a place where you can configure this, but i don't know where ;)

I hope it will help you...
 

Hi, I work with MPLAB 6.50, and microchip's C18 v2.20.4, and target pic18f452.
Fuses I enter manually in MPLAB menu - Configure->Configuration bits.
If Debugger is selected in MPLAB it automaticaly set DEBUG fuse, and if programmer is selected DEBUG is not enabled.
My ICD2 program evritnig ok(include fuses) I chek it by another programer.

Intersting is that in first few times I testing ICD2 it works, after that it's stop to enter in debug mode?!?!
Icheck evrithing, and rebuild with new parts switches for VDD and VPP but notnig.........
Another strange tning is that not evri time can program target if COM speed is 57600...

Thanks.
 

I have been meet it. One of Three reasons:
- Check all protect code, write protect, read protect code in Menu->Configuration Bits (if you use MPLAP) is status DISABLE
- Replacement XTAL.
- Finally, Replace Chip
I am sure.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top