Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

New ICD-2, not sure what to do!

Status
Not open for further replies.
Hi,

I've just received an ICD 2 header and adaptor from Farnell UK. I'm not sure where all the connections go! Please point me in the right direction.

**broken link removed**


Thanks in advance for any help.
 
The pin are arranged the same way on both the PICkit2 & ICD2 you need a 1:1 six pin inline to RJ-12 cable.

Edit:
I didn't scroll far enough right on your photo, you've got the adapter just need to use a 6pin male header and pin1 goes to pin1.
 
Last edited:
Hi,

Thanks for the prompt reply. Is this correct? What do I do with the 2 x 10 pin headers and the 20 pin skt?

I have purchased this because I am under the impression that it will allow me to examine the registers of the PIC chip when it is operating 'in circuit'. Is this the case?

**broken link removed**

Thanks again! All assistance appreciated.
 
I think I know how it is supposed to be connected and it is not like that. Please don't power it up until someone with more knowledge than I of these headers posts.

Mike.
 
Hi,

Thanks. Yes, that's why the power is disconnected in the second photo!

I posted here because I've not found, as yet, the answer on the Microchip website. There's a tremendous volume of technical stuff available but unless you know exactly what you're looking for it is hard to find!

When I've been working through the tutorials that came with the Pickit2 the supplied .asm files have this in them:

*******************************************************************
; * NOTE: The PIC16F690 requires the AC162061 header for debugging *
; *******************************************************************

so that's why I purchased it.

I'll get there eventually, thanks again.
 
Hi,

Thanks for the prompt reply. Is this correct? What do I do with the 2 x 10 pin headers and the 20 pin skt?

I have purchased this because I am under the impression that it will allow me to examine the registers of the PIC chip when it is operating 'in circuit'. Is this the case?



Hi,

With no disrespect to anyone on this forum, think you shoud post your photos and question direct to the Microchip Pickit2 forum.
Think that will equally show them how confusing all their headers etc are, and so help get the message across to others, as well as giving you the answer you need.

I know many people like to stay with a low pin count chips thinking its easier, but using a 40 pin chip allows direct programming and debugging without any headers etc.
 
Badger,

as mentioned by Bill and Co, the AC164110 Adaptor is not designed to be used as in your second photo. It is an adaptor to allow the PICkit2 to be used in place of the ICD2 and basically serves as a converter for connectivity to demo boards such as PICDEM 2 Plus, PICDEM 4, Mechatronics etc, which do not have a specific PICkit2 header. (along with connecting to debug header boards)

Some of the later demo boards, such as Explorer 16 and HPC Explorer 2 have both the RJ12 AND PICkit2 connectors, but be aware that the Explorer 16 silkscreen is incorrect regarding pin 1 of the PICkit2 header... Pin 1 of the silkscreen is actually pin 6 and thus PICkit2 should be inserted with the logo side facing to the left.

As far as the debugging headers go, I'm in the same boat as those who have previously posted...I'm not really sure how your AC162061 should be used with a target, so I'll pass on this one.

HTH.
 
I like a challenge and have done a little research into this header board confusion.

It appears that the target chip (Standard 16F690) is removed from the target PCB and, using the 2 X 10 pin strips, the header board is used to emulate the target chip, but with the added benefit of debug capability due to the SMD PIC on the top side of the header board. (Which is not shown in your photo's...the DIL socket is actually the bottom of the header board.)

The top of AC162061 can be seen roughly halfway down the following page:
https://www.microchipdirect.com/Pro...hip&Category=Headers&mid=10&treeid=6&lmid=601

More information regarding the usage of header boards can be found within the following PDF:

https://www.electro-tech-online.com/custompdfs/2008/08/51292P.pdf (See page 14 for 16F690 DIP switch settings)

HTH.
 
Last edited:
Hi Mickster,

Thanks for your help, got it going.

**broken link removed**

**broken link removed**

Does anybody know how to slow down the speed at which the debugger 'animates' i.e. executes each instruction in debug mode? I'd like to be able to execute each instruction only when I decide to. Can't see any option to do this in MPLAB.

:eek: OK! Use the 'Step into' function, I see. Noob eh?
 
Last edited:
There may be some minor errors within this post, partly from my own (mis)understanding as a hobbiest and partly due to the lack of clear help within MPLAB IDE, but I'll have a go..


When PICkit2 is selected as the debugger, there are a number of extra icons displayed on the toolbar within MPLAB IDE, some of which typically resemble those you would find on a VCR or tape-deck.

Play - > = Run
Pause - II = Halt
Fast Forward - >> = Animate
... and some others that require more detailed explanation...

...but we will start with the familiar ones.

Run (>) - Actually runs the program with no indication of program counter position, until Halt (II) is clicked. Upon clicking Halt, the last instruction executed is displayed in the currently active window - frustratingly, the assembly listing is displayed as default. (other choices are available under the "View" menu heading, however, they will not be in focus after a halt.)

Halt (II) - What it says on the tin.

Animate (>>) - You have already found this function and can appreciate that the program is executed as quickly as MPLAB and your machine are capable, whilst updating currently-open windows. Trying to bring another window other than the assembly listing into focus is, again, futile. Upon re-starting an animation, any previously-closed assembly listing is re-opened and animation takes place within. Kinda boring when stuck in a delay routine.


Now to the more helpful stuff.

To the right of the "Animate" icon is the "Step into" icon. {¬}
This icon, with each single click, will perform a single-step execution within the program...each line is executed and switching between other windows can display a changing register content etc. - great for monitoring the change of a TRISX or PORTX event, but quite repetative when looking at a delay loop....which leads to the next icons.

Step over - {}¬
This next icon, with each single click, will ignore the current instruction and leave it's related registers unchanged. *Better interpretation/explanation required from the more-experienced forum members.*

Step out - This icon, when clicked, executes the program from the current position, until a "return" is processed. Useful for processing a particular routine in it's entirety and returning to the program branch which called the routine.

Reset - What it says on the tin - Returns the program to the initial power-on state.

Breakpoint - A pre-determined point within the program, selected by double-clicking a particular line, where program execution is requested to be halted upon particular conditions being met. Consider a BTFSC PORTA, 0 loop testing for switch input on Bit 0 of PORTA. The program will continue to execute until PORTA Bit 0 switch is pressed...and then the program will break.


Hope I've got most of this right...Sure I'll find out sooner or later.


BTW, the initial Q never got answered...."Animate" speed can be adjusted for MPLAB SIM in 'Debugger' - 'Settings' - 'Simulator settings', but AFAIK, there are no similar options for PICkit2.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top