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 CCS Technical Support

MPLAB Debugger Error with PIC12F675

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



Joined: 20 Sep 2006
Posts: 4

View user's profile Send private message Send e-mail MSN Messenger

MPLAB Debugger Error with PIC12F675
PostPosted: Mon Sep 25, 2006 8:31 pm     Reply with quote

Hi,

I tried to do in-circuit debugging with PIC12F675 using MPLAB IDE in debugger mode connected to ICD2. I'm using MPLAB IDE v7.42 and the compiler is PCWH v4.010.

I can program in programmer mode without any error and have checked that it functions correctly. But when I switch to debugger mode and tried to program or do single stepping/run/animate, I get the following outputs:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC12F675 found, revision = Rev 0x10
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
...Validating configuration fields
Connecting to debug executive
Entering Debug Mode
...Programming GOTO 0x00 command
ICD0083: Debug: Unable to enter debug mode. Please double click this message for more information.
MPLAB ICD 2 Ready


The following is my code (very simple just to blink the LED):

#include <12F675.h>

#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOCPD //No EE protection
#FUSES NOPROTECT //Code not protected from reading
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPUT //No Power Up Timer
#FUSES BROWNOUT //Reset when brownout detected

#use delay(clock=4000000)
void main()
{
int i=0;
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_comparator(NC_NC);
setup_vref(FALSE);

while(1)
{
i ^= 0x20;
output_a(i);
delay_ms(1000);
}

}


Can anyone see anything wrong?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Sep 25, 2006 8:47 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=21971&highlight=12f675icd
o-milo



Joined: 20 Sep 2006
Posts: 4

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Mon Sep 25, 2006 9:08 pm     Reply with quote

Hi PCM, thanks for the link. So does it mean that, PIC12F675 won't support debugging and I have to get the PIC12F675-ICD. Is that still the only way of doing it?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Sep 25, 2006 9:22 pm     Reply with quote

MPLAB � ICD 2 Header Specification:
http://ww1.microchip.com/downloads/en/DeviceDoc/ICD2_Header_51292L.pdf

From page 2:
Quote:

Some devices have no built-in debug circuitry. Therefore, special ICD
versions of these devices are required for MPLAB ICD 2 operation.
Other devices have built-in debug circuitry and do not require a header
to use MPLAB ICD 2. However, some pins and memory must be used to
support the ICD function. Therefore, for some of these devices, special
ICD versions offering additional pins (and sometimes memory) are
available to provide more transparent debugging capabilities.



Quote:
Is that still the only way of doing it?

Develop the code on a larger PIC that has built-in ICD2 support,
such as a 16F877. Move it to the 12F675 later. Watch the size
of the code during development, to make sure it doesn't exceed
the ROM size of the 12F675.
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