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. 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.
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.
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**
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.
You should put another button on your mouse then or get one with like 5 buttons on it and set 1 to f7 lol
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!
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.
Nice of Microchip to not follow their own programmer's pinout in their diagrams. Oh well, not a big deal. The PICkit 2 probably hadn't been invented yet when that was drawn.
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.
Nice of Microchip to not follow their own programmer's pinout in their diagrams. Oh well, not a big deal. The PICkit 2 probably hadn't been invented yet when that was drawn.
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.????
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.
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.