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

PIC12F675 with ICD2 as a debugger...
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
RichardY
Guest







PIC12F675 with ICD2 as a debugger...
PostPosted: Tue Feb 22, 2005 10:17 am     Reply with quote

This is the first time I've ever used a PIC, and I'm struggling!

I've written my code (which compiles OK with the Debugger option ticked), but am having no success with the ICD2 as a debugging tool.
The software seems to be being programmed into the device (i.e. no errors are reported), but when I try to use the debugger I get:

ICD0083: Target not in debug mode, unable to perform operation
ICD0069: Unable to run target

and nothing else seems to happen.

The I/O to the device is very simple. GPIO0 & GPIO1 are reserved for programming/debugging only, and GPIO3 (MCLR) is just tied high with a pull up.

I'm using the internal clock, which shouldn't cause problems according to the help files...

I'm using the following fuses etc.:
#device adc=10
#use delay(clock=4000000)
#fuses NOCPD, NOPROTECT, NOMCLR, NOPUT, INTRC_IO, NOBROWNOUT, NOWDT

I even tried the #device ICD=TRUE, but to no avail.

Any help would be greatly appreciated...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 22, 2005 10:45 am     Reply with quote

Do you have the special header required for debugging with the 12F675 ?
Go to this page and scroll down to the section titled "Notes about MPLAB ICD 2 Headers".
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046
RichardY
Guest







PostPosted: Tue Feb 22, 2005 11:03 am     Reply with quote

Do I need one of these header boards even if I'm not using these pins in my application (i.e. they are dedicated to programming/debugging)?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 22, 2005 1:40 pm     Reply with quote

I read the document that I linked to you a bit more closely
and I think you might be right. Mr. Green
Unfortunately my one 12-series PIC appears to be dead
(even with PicStart-Plus). I have some more, but I can't
get them until tomorrow morning. So you'll have to wait
until Wednesday unless someone else can help you sooner.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Tue Feb 22, 2005 5:18 pm     Reply with quote

The 12F675 doesn't have the debug module. They have a special version with the ICD suffix. This is the part that goes in the header and then plugs into the 8 pin socket.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 23, 2005 1:21 pm     Reply with quote

My problem was that the document I linked to above has this statement:
"Since in-circuit debugging requires the loss of clock, data and
MCLR pins, MPLAB ICD 2 development with actual devices is
not practical."

I interpreted "not practical" as meaning inconvenient, but still possible.
In fact the MPLAB 7.01 help file says this, regarding the 12F675 and
12F629:

"Only ICD devices (e.g., PIC12F629-ICD) can be used to debug with MPLAB ICD 2".

Programming the standard 12F675 (ie., not -ICD type) does work with
the ICD2, though it wouldn't let me use NOMCLR when INTRC_IO was also selected.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Thu Feb 24, 2005 6:58 am     Reply with quote

PCM programmer wrote:
My problem was that the document I linked to above has this statement:
"Since in-circuit debugging requires the loss of clock, data and
MCLR pins, MPLAB ICD 2 development with actual devices is
not practical."

I interpreted "not practical" as meaning inconvenient, but still possible.
In fact the MPLAB 7.01 help file says this, regarding the 12F675 and
12F629:

"Only ICD devices (e.g., PIC12F629-ICD) can be used to debug with MPLAB ICD 2".

Programming the standard 12F675 (ie., not -ICD type) does work with
the ICD2, though it wouldn't let me use NOMCLR when INTRC_IO was also selected.


Not practical in this case means that it would comsume too many pins. Basically there would be much of anything left. The 12F675-ICD devices are 14 pin devices and that is where the header comes in. The extra pins are routed to and ICD connector and the rest go to a set of pins to plug into your circuit.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 24, 2005 1:16 pm     Reply with quote

If it was just about the bonding-out of the pins, then I should still be
able to use the 8-pin 12F675 for limited debugging. But I can't (I tried).
Then I read the reason: The 8-pin chip is missing the ICD peripheral
module that permits debugging the chip. Only the special 12F675-ICD chip has this module.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Thu Feb 24, 2005 1:58 pm     Reply with quote

Mark wrote:
The 12F675 doesn't have the debug module. They have a special version with the ICD suffix. This is the part that goes in the header and then plugs into the 8 pin socket.


Wink yep, that is what I said. They saved a few microcents
RichardY
Guest







PostPosted: Fri Feb 25, 2005 9:04 am     Reply with quote

I've ordered and now recieved an AC162050 header to use for debugging.

It comes with a PIC12F675-ICD already fitted (it is indeed a 14 pin device).

All I have to do now is try it and see if it works!

Thanks to everyone who replied for their assistance, you've saved me hours of head-aches...
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Feb 25, 2005 10:41 am     Reply with quote

Well I did count the pins on the one that I was looking at Wink
hmnrobots



Joined: 02 Oct 2009
Posts: 11

View user's profile Send private message

PostPosted: Wed Mar 09, 2011 9:26 am     Reply with quote

Happy to find someone who tried that 12F675 header. So did I
But so far no joy! a very simple program (led blinking) in asm works but the same in C doesn't !

Has any one ever have success with that header ? What's the trick ?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Wed Mar 09, 2011 9:33 am     Reply with quote

No tricks that I remember. If it works in ASM and not in C then I'd say its your C program that is the cause and not the header.
hmnrobots



Joined: 02 Oct 2009
Posts: 11

View user's profile Send private message

PostPosted: Wed Mar 09, 2011 10:25 am     Reply with quote

So I would but I've been trying and trying for the last 2 days!
I guess something wrong in the config ??
did you say you 've used the 12F675 header connected to ICD3 with sucess ?*
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Wed Mar 09, 2011 10:28 am     Reply with quote

That was 6 years ago. I used the header it worked. I used an ICD2, the ICD3 is fairly new. Point is, if your program doesn't run at all but an asm program does run, then it's you program and not the header.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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