I've been using PICs with the PICDEM board, and thought i'll start using with a PICkit2/3 on a breadboard.
I have my own power supply of 5V which is regulated using a LM7805, and connected the Vdd and Vss of the PIC, and made the connections from the PICkit2 to the PIC. (I had the diagram from the PICkit3, so I assume its the same?)
After powering up the device and connecting it to the PC, when I try to run my program I get an error telling me that the PICkit2 cant enter debug mode. I dont have an external oscillator..
I have a 4MHz crystal but didnt fix it since I dont have the proper capacitors to connect it with as stated in the datasheet. Also, how do i know which oscillator mode to run the PIC with?
The sheet with the PICkit3 says that I need an oscialltor to enter debug mode..is that the same for the PICkit2?
EDIT: I still want to know how to get to work in debug mode, but i used it as a programmer, and then i disconnected it from the PIC. and then I disconnected the power, and switched it back on to the PIC. Its a simple program jus to light two LEDs on. After connecting the power, it took about a second or 2 to light the LEDs. Is that normal?
so without the caps, jus connect the crystal and use it in XT mode?will try that you and let you know how it goes..come to tihnk of it, other projects on breadboards i've never seen caps with the crystal..
i need to define the CONFIG register at the begining right?or do i use
so without the caps, jus connect the crystal and use it in XT mode?will try that you and let you know how it goes..come to tihnk of it, other projects on breadboards i've never seen caps with the crystal..
i need to define the CONFIG register at the begining right?or do i use
This is the output i get..I regulate the voltage with an LM7805, and my voltmeter says its 5.04..but PICkit2 says its only 4.98. Is that the problem?
I first connected the PICkit2 without powering my dev board, and then I got the same error, but underneath it said that the target didnt have power. Powered the board up, and stil have this problem. Added the crystal and the capacitors, still no change.
Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power detected ( 4.98V)
PIC18F4520 found (Rev 0x1)
PICkit 2 Ready
Aside from the config of the clock source issue, similar debugging experience described here, which version of the Pickit 2 also matters. The old version, black button, doesn't have pulldown resistors on PGC and PGD. The fix for was to add the pulldowns, for the debugger to operate properly. The newer red button Pickit 2 has those pulldowns.
Also the MCLRE is expecting a 10k pullup, unless the config has turned it off.