Using MPLAB/Junebug ICSP to Debug

Status
Not open for further replies.

SPDCHK

Member
Excuse my ignorance but...

This will be my first attempt at using the Debug function of MPLAB via Junebug. I design all my circuits to be programmed via the ICSP, but I never considered incorporating RB6 and RB7 in such a manner that they can be used during debugging

**broken link removed**

According to this diagram, I must allow for isolation of RB6 and RB7, and according to the "In Circuit Serial Programming guide" DS30277D, I must assign RB6 as being input only, but from what I understand, RB7 can be either Input or Output.



My questions are...

  1. What do they mean with "ISOLATION"? Is this just a resistor or a diode?
  2. Can I still use RB6/RB7 for normal I/O but just follow the rules as identified above
  3. What do I need to setup in MPLAB V8.10 to make full user of the debugging functionality?

Thank you
 
It boils down to loading the pins. ICP is very fast hence the short cable length.
I often use PGC & PGD as pushbutton inputs if I just have to use every single io pin. Of course the pins are disabled by the debug mode.
 
If you only connect RB6 and 7 to the ICSP there is nothing else to do. Pick the PICkit2 as the debugger (instead of programmer) in MPLAB and you are up and running.

With In Circuit Programming it is possible to use these pins for IO if you follow the rules. During debug these pins are used for run control and sending debug info only.

That is the short of it. Read the datasheet for more accurate info.

3v0
 
I thought I might first try debugging on one of the smaller PIC's 12F675. In this case GP1 = PGC, GP0 = PGD and GP3 = Vpp(MCLR).

I've selected MPLAB Debugger tool for PicKit2.

My fuses are set for __CONFIG 0x31F4, (InternalRC, No WDT, MCLR Pin Enabled, Code protect off, Data protect off)

When programming the PIC normally, it operates 100% (simple flashing LED),
But when I try to access degug mode, I get the following error message ...


By Googling "12F675 "Header Specification" DS51292", I managed to come to this site, **broken link removed** where I read this little bit of text


Do I seriously need this AC164110 adaptor?

Seems like its more troublesome than useful this debugging business

I'd rather stick with normal simulation as I've been doing for the past 5 years
 
... and PIC's 16F628A & 16F877. Will they work?

Let me rephrase the question...

Can you possibly give a link or a list of all the PIC's the Junbebug will support debugging via MPLAB?
 
Last edited:
There are huge number of chips. It looks like you can not debug with the 18 pin 16F628A (as per datasheet) but you can with the 16F88 and all 18F chips that I have used. 18F1320 and 18F1330. I expect all 18F chips and all newer 16F 18 pin and greater have debug.
 
Last edited:
... like I said in the very first post, excuse my ignorance, but then, there's no excuse for not doing the "RTFM" thing (RTFM = Read The F.... Manual)

Each PIC's datasheet clearly states if it does or does not support debugging. You just need to know where to look for that information in the datasheet (like I do now)

Thanks for the replies.
 
The 877 has debug built in however the 628A doesn't and requires a header. To check which chips need headers go into MPLAB, select the chip in question and it will tell you if a header is required. The newer 16F88 is an 18 pin device that does have the debugger built in.

Mike.
 

The AC164110 header adaptor uses an RJ-11 connection, (something the Junebug does not allow for). Is there something else available that can be used i.s.o. aforementioned header adaptor that can be used with Junebug?

Yes, I noticed in the 16F628A datasheet that it does not support debugging without the header adaptor.
 
I pulled the debug PIC from the header and built a small PCB with a 2x5 header to play with the 12F675.
You could also use a 16F88 and connect similar I/O to the target. It's a kludge but I've done that too.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…