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.

pic debugging, where to start

Status
Not open for further replies.

jay543_uk

New Member
hey all, I need a pic debugger, i'm a newbee and dont no where to start.
at the mo i have a vellemen programmer and thats it.

HELP!!!!!!!!

seen icd2 on ebay for about £30, is there any thing i should no before buying one and also i have no idea how they work or connect

can any one help me

jason
 
hey all, I need a pic debugger, i'm a newbee and dont no where to start.
at the mo i have a vellemen programmer and thats it.

HELP!!!!!!!!

seen icd2 on ebay for about £30, is there any thing i should no before buying one and also i have no idea how they work or connect

can any one help me

jason
Forget the ICD2. It's old and slow. And that price is about double what you should be paying for one.

Get yourself a . You won't be sorry.

The Junebug is a PICkit 2 clone, but also comes with a bonus 18F1320 experimenter on-board.
 
Last edited:
im working with 16f876a, will they work with this.

also how do they work, i no nothing about debugging, the only debugging iv done is use the simulator in mplab

how do you connect them, do i have to have a specail circuit or can i just plug into the circuit iv made

many thanks for any help

jason
 
im working with 16f876a, will they work with this.
Yup. I have a 16F876 here and it works fine with PICkit 2.

also how do they work, i no nothing about debugging, the only debugging iv done is use the simulator in mplab
Simulator isn't debugging! :D Debugging means that the chip gets programmed with your program and special code that allows MPLAB to control the chip while your program is running. That way you can run your actual code, in the chip, and start/stop it at will, single-step through the program, view/change variables and registers, use breakpoints, etc. It's great for finding where your program is going wrong. :p

how do you connect them, do i have to have a specail circuit or can i just plug into the circuit iv made
You put the usual 5-pin ICSP connector on your target breadboard or circuit board and run a ribbon cable from the programmer/debugger to the target. You can program and debug the chip in-circuit without having to diddle around with taking it out of circuit and putting it in a ZIF socket in a programmer. Very nice, and fast. You can also power your target board from the PICkit 2 provided it doesn't eat too much power.

Have a look on my web-site (below). You'll see many examples of PICkit 2 and Junebug programming and debugging target breadboards. Lots of photos.
 
Last edited:
Here's a photo of it in action.
**broken link removed**
Yes, I realize I'm using a 10-pin connector and a 10-conductor cable, but only 5 are actually being used. 2x5 is just much more secure on a breadboard than 1x5, and 2x5 connectors are cheap and easy to use.

Here's a pic of the Junebug programming a breadboard:
**broken link removed**
 
Last edited:
Futz said:
Simulator isn't debugging! Debugging means that the chip gets programmed with your program and special code that allows MPLAB to control the chip while your program is running.
A simulator is not in-circuit debugging but it is debugging.

In practice the debugger is coupled to an execution engine. That can be a simulator, ROM monitor, in circuit debugger (ICD2 or PICKit2), or a processor emulator.
 
Last edited:
F7 all the way for me until I can afford a PicKit2

I've done so much debugging in MPLab (or simulating/debugging) that my F7 key has almost worn through the printing ;)
 
looks pritty simple but what is a icsp connector, how does it connect into the circuit.

does it mean you have to have a bootloader on the pic , iv heard of them but not used them before.

will the clone work with mplab as well

jason
 
F7 all the way for me until I can afford a PicKit2

I've done so much debugging in MPLab (or simulating/debugging) that my F7 key has almost worn through the printing ;)

You should put another button on your mouse then or get one with like 5 buttons on it and set 1 to f7 lol :D

Junebug is the best i wish i lived in Canada so i can shake Bills (William) hand in person for such a great tool! I also own a pickit 2 and personally never really touch it unless i have 2 projects like my Infrared Transmitter and Receiver. So i use 2 PCs to debug both at same time. Messy but worth it!

I wish i had 2 Junebugs still.
 
looks pritty simple but what is a icsp connector, how does it connect into the circuit.
ICSP = In Circuit Serial Programming. The pinout is as follows:
1 - VPP - VPP pin on target chip
2 - 5V - VDD on target circuit
3 - Gnd - Ground on target circuit
4 - PGD - PGD pin on target chip
5 - PGC - PGC pin on target chip

does it mean you have to have a bootloader on the pic , iv heard of them but not used them before.
No. The debugger provides its own code.

will the clone work with mplab as well
Of course. It's a clone, so it's identical (or similar enough that you won't notice) to the original. MPLAB thinks it's a genuine PICkit 2.
 
looks pritty simple but what is a icsp connector, how does it connect into the circuit.

does it mean you have to have a bootloader on the pic , iv heard of them but not used them before.

will the clone work with mplab as well

jason
ICSP stand for In Circuit Serial Programming. The ICSP connector in Futz's picture is the 2x5 header on the end of the ribbon cable. ICD or In-Circuit-Debugging is accomplished by commands sent over the ICSP cable. The debugger hardware uses the cable to talk to a built in run control monitor on the PIC (target chip).

A boot loader is much different. You can not do ICD with a boot loader. In short in it a small program on the PIC (target) that knows how to program the PIC. The bootloader most often reads the program from an RS232 port. If the bootloader does not overwrite itself, it can be used to repeatedly program the target. Because the bootloader can only program the PIC it is on, you need another programmer to program the boot loader.
 
Last edited:
well iv found microchip PICkit 2 Starter Kit , its £33, nice and cheap. so with this i can debug and programme in circuit without having to remove the pic each time.

noticed it comes with a C compiler,at the mo im using asembly, should i look at learning C, is it worth it.????
 
whats the difference between

**broken link removed**

and

**broken link removed**

the ebay one is £2 more but i think its alot better deal????
 
well iv found microchip PICkit 2 Starter Kit , its £33, nice and cheap. so with this i can debug and programme in circuit without having to remove the pic each time.
See if you can buy just the PICkit 2 itself without the stupid starter board. That price is too high.

noticed it comes with a C compiler,at the mo im using asembly, should i look at learning C, is it worth it.????
It comes with a disk full of Microchip's demo software.

C is nice. Simpler and faster to develop things than with assembler. You should really understand assembly language at least a bit though, to get the most out of C.
 
I would also recommend DipMicro has a PicKit 2 Clone for cheap i havent tested nor do i own one but heh its cheap.

oh yeah i think this will do:
**broken link removed**
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top