View previous topic :: View next topic |
Author |
Message |
RichardY Guest
|
PIC12F675 with ICD2 as a debugger... |
Posted: Tue Feb 22, 2005 10:17 am |
|
|
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
|
|
|
RichardY Guest
|
|
Posted: Tue Feb 22, 2005 11:03 am |
|
|
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
|
|
Posted: Tue Feb 22, 2005 1:40 pm |
|
|
I read the document that I linked to you a bit more closely
and I think you might be right.
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
|
|
Posted: Tue Feb 22, 2005 5:18 pm |
|
|
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
|
|
Posted: Wed Feb 23, 2005 1:21 pm |
|
|
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
|
|
Posted: Thu Feb 24, 2005 6:58 am |
|
|
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
|
|
Posted: Thu Feb 24, 2005 1:16 pm |
|
|
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
|
|
Posted: Thu Feb 24, 2005 1:58 pm |
|
|
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. |
yep, that is what I said. They saved a few microcents |
|
|
RichardY Guest
|
|
Posted: Fri Feb 25, 2005 9:04 am |
|
|
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
|
|
Posted: Fri Feb 25, 2005 10:41 am |
|
|
Well I did count the pins on the one that I was looking at |
|
|
hmnrobots
Joined: 02 Oct 2009 Posts: 11
|
|
Posted: Wed Mar 09, 2011 9:26 am |
|
|
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
|
|
Posted: Wed Mar 09, 2011 9:33 am |
|
|
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
|
|
Posted: Wed Mar 09, 2011 10:25 am |
|
|
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
|
|
Posted: Wed Mar 09, 2011 10:28 am |
|
|
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. |
|
|
|