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.

not able to debug pickit3 with MPLAB V8.92

Status
Not open for further replies.

prakashvenugopal

Advanced Member level 1
Joined
Jun 1, 2011
Messages
473
Helped
15
Reputation
30
Reaction score
15
Trophy points
1,298
Activity points
4,973
Hi all,

i am getting following error message in MPLAB IDE V8.92

PK3Err0033: 4 bytes expected, 0 bytes received Failed to properly connect to PICkit 3 while connecting pic kit3

PICkit 3 detected
Connecting to PICkit 3...
PK3Err0033: 4 bytes expected, 0 bytes received
Failed to properly connect to PICkit 3
Can anyone help me to solve the issue?

i am using my Pic16f785 target board.

Regards,
V. Prakash
 
Last edited by a moderator:

Dear sir,

I dont have that ICD header for 16F785. i am connecting my pickit3 to my target board PIC16F785 to debug. Pickit3 alone will not support debugging?

Pickit3 Pin 1 to /MCLR/VPP
Pickit3 Pin 2 to VCC(5V)
Pickit3 Pin 3 to Gnd
Pickit3 PIn 4 to PGD
Pickit3 pin 5 to PGC

My requirement is to see my real time adc value in the watch window by debugging it. Is there any way to see my real time adc value without debugging. Please let me know.

Regards,
V. Prakash
 

I assume you have installed PICKit 3 programming software that is the standalone programming software. If yes, connect PICKit 3 to PC and open PICKit 3 Programming Software and from Tools menu choose "Revert to MPLAB mode". Before doing this close MPLAB if open. Then after doing this open MPLAB and then try connecting to the device using PICKit 3.
 

hi ,

i tried this. it gets connected but showing the error as follows:

PICkit 3 detected
Connecting to PICkit 3...
Firmware Suite Version...... 01.28.90
Firmware type......................Midrange
PICkit 3 Connected.
Target Detected
Device ID Revision = 00000003

Running...
PK3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.

regards,
V. Prakash
 
Last edited by a moderator:

Have you selected DEBUG for build type in MPLAB ?

- - - Updated - - -

Can you program the device in Program mode ? If yes, then zip and post the complete MPLAB project files. Have you set the config bits properly ? Show your config bits settings. MCLRE is enabled ? If yes, do you have 10 k pullup for it ?
 

Hi,

yes. i am able to program the device in Program mode.
This is my config bit setting

__CONFIG ( INTIO & WDTDIS & MCLRDIS & PWRTDIS & IESODIS & FCMDIS ); //Configuration Word

I didnt pullup the MCLR pin as it is disabled.

Regards,
V. Prakash

- - - Updated - - -

Hi pic.programmer,

Are you sure that we can debug the Pickit3 with MPLAB without PIC16F785-ICD header? Please let me know.
Because whenever i try to connect it shows

PICkit 3 detected
Connecting to PICkit 3...
Firmware Suite Version...... 01.28.90
Firmware type......................Midrange
PICkit 3 Connected.
Target Detected
(After that the dialogue box open. The same i had attached)
Device ID Revision = 00000003

(when i click run button)
Running...
PK3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.

Please let me know.
Regards,
V. Prakash

- - - Updated - - -

 

I don't have that PIC to do the testing. I told you to zip and post the complete MPLAB project files so that I can check the project settings. You have to enable MCLR pin I thing because after programming the chip to debug the PICKit 3 has to reset the device to go to main().
 

Hi,

I had tried the Pullup in MCLR with 10k resistor. not solved.
Here is the Sample MPLAB project file for your reference.

Regards,
V. Prakash
 

Attachments

  • sample.rar
    2.5 KB · Views: 120

The file you attached is of no use. it is not the complete project. I need the complete project with .mcw file and other files. If you can post the complete project then I can try to help you.
 

Hi Pic.programmer,

I am attaching the complete file for your reference.

Regards,
V. Prakash
 

Attachments

  • sample.rar
    60.3 KB · Views: 121

PK3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.

In the MPLAB IDE it is set to Manually Program. Automatic Programming after build is disabled and maybe this has to do something with the problem.

Try manually programming the device before trying to debug. See if this solves the problem.
 

Hi,

Please find the settings in the attachment.

Still throwing this error:

PK3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.

Regards,
V. Prakash
 

Attachments

  • settings1.JPG
    settings1.JPG
    43.6 KB · Views: 168
  • Settings.JPG
    Settings.JPG
    28.4 KB · Views: 210

Problem is your power setting, if you are giving power external to your board than its ok. If not then you have to give power from USB; for this select "PICKIT3" as debugger the go to "debugger settings" go to "power tab" and check "power target circuit from Pickit3".

Also remember for debugging first compile your code and than program your target device form "debugger tab" NOT form programmer tab.
 

Hi,

I tried with power settings also. The same error occurs. Please tell me that we can debug the Pic16f785 using Pickit3 and MPLab without using ICD Header for it? Did anyone did that?

Regards,
V. Prakash
 

Microchip MPLAB ICD2 incircuit debugger need ICD Header to debug the IC16f785?

Hi all,

Microchip MPLAB ICD2 incircuit debugger need ICD Header( AC162060 ) to debug the IC16f785 with MPLAB? Without this ICD header we cannot debug this part?
MPLAB ICD2 incircuit debugger has internal debugger option or we have to use the ICD header( AC162060 ) to debug the IC16f785?
Please let me know.

Regards,
V. Prakash
 

PIC16F785 can be debugged without the ICD header device. It's used if you don't want to loose pins for debugging interface.
 

Hi,

I tried with Pickit3 without ICD header for debug option. But still throwing the same error. Did any Special source code implemented in that ICD header board(AC162060) for debugging?

Regards,
V. Prakash
 

I reviewed the MPLAB debugger help and it tells me:
PIC16F785 Limitations
Headers are required for debug when using these devices. See the “Debug Header Specification” for details.
I fear, my previous statement was wrong. Sorry for the confusion.
 

Hi,

Ok. now i am clear that the Debug option can be done only via PIC16F785-ICD header(AC162060). i will proceed to buy that. Please refer the attachment for Interfacing the Debug Header with ICD2 interface. There is the 20 pin output PDIP from the header board. This is connected to the Target board. My question is, we need 16f785 IC in the Target board or we can directly debug using the ICD header IC in it having only the adc circuitry in my target board? that 20 Pin P-Dip have to connect to my 20 pin 16F785 in my target device?

Regards,
V. Prakash

https://obrazki.elektroda.pl/2479557800_1457430392.png
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top