CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Debugging problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mancio76



Joined: 10 Aug 2011
Posts: 8
Location: Italia

View user's profile Send private message

Debugging problem
PostPosted: Wed Aug 10, 2011 6:22 am     Reply with quote

Hello to everyone.

I'm working with PIC16F88 and MPLAB 8.73
CCS compiler version 4.103
I use ICD to program and debug the code.

When I compile and download the code on chip, the system works greatly.
But I also would like to enter in debug mode to analyze the workflow.

But the MPLAB can't do this!

The code I've wrote is this:
Code:

#include <16F88.h>
#device *=16
#device ICD=TRUE
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC                    //Internal RC Osc
#FUSES PUT                      //Power Up Timer
#FUSES MCLR                     //Master Clear pin enabled
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD                    //No EE protection
#FUSES NOWRT                    //Program memory not write protected
#FUSES DEBUG                    //Debug mode for use with ICD
#FUSES NOPROTECT                //Code not protected from reading
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES IESO                     //Internal External Switch Over mode enabled
#FUSES RESERVED                 //Used to set the reserved FUSE bits
#FUSES CCPB3               //CCP1 input/output multiplexed with RB0

#use delay(clock=8000000,RESTART_WDT)

When connecting the ICD to the chip for the debug, the MPLAB window tell me the following:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC16F88 found, revision = Rev 0x8
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x57)
...Loading DebugExecutive
...Programming DebugExecutive
...Programming Debug Vector
Verifying...
...Program Memory
...Debug Executive
...Debug Vector
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
Connecting to debug executive
ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information.
MPLAB ICD 2 ready for next operation

Is there anyone can tell me where is the problem?

Thank you in advance.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 10, 2011 10:16 am     Reply with quote

Look in the MPLAB Help file for the ICD2.

1. In MPLAB, go to the Help / Topics menu. In the Debuggers section,
select "MPLAB ICD 2".

2. In the pop-up window for ICD 2 Help, go to the Search tab and
search for this: Top reasons

3. It will show you this result: General Debug Failure Actions
Click on that one and read this section:

Top Reasons Why You Can't Debug
mancio76



Joined: 10 Aug 2011
Posts: 8
Location: Italia

View user's profile Send private message

PostPosted: Thu Aug 11, 2011 9:34 am     Reply with quote

Many thanks for the help.
Finally I can enter in debug mode!

But to do that, I've use an external crystal as clock source.
Seems that the PIC16F88 can't work in debug mode using internal oscillator.

Is correct this?

If someone can answer to the question, can be an opportunity to understand something more about the PIC16F88.

I've read some times the data sheet of the PIC16F88 but I've not noticed something about internal oscillator and debug mode.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group