• 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 only works connected to debugger...

Not open for further replies.


New Member
Hey gang...

Trying to get a basic "bit whacker" up and running. I've grabbed the source for the bootloader, and updated it for the 20Mhz resonator that I have connected. At this time I've kept things very bare-board. I've got a couple of diagnostic LED's attached (different pins from the original fw, so I have updated for the new locations). I also moved the "debug" switch to a (now obviously stupid) different location (pin 28, thus conflicting with the ICSP).

Most of this is redundant information as the question is.. what could lead to having a software image that will load and run just fine, when under control of the debugger (JuneBug), but won't run on it's own?

My "hello world" is - led init, led light, loop forever. Works flawlessly under debugger control, but nothing appears to happen when I disconnect the JuneBug.


[Edit: 18F2550 is connected to USB for power. So it's not a case of losing power when I disconnect the debugger. :) ]
Last edited:


Well-Known Member
Most Helpful Member
It's because it has the debug executive loaded as well as your code. Select your PicKit2 as a programmer instead of a debugger and it will work fine.



New Member
Oh mah gawd...

:eek: I've spent hours chasing this... when you describe the solution it's so obvious.

Thank you.. burned the hex with PK2 directly.. disconnected.. and presto.. led's are lit.


Thx again.. I'm packing it in for the night. (2:14 am it plenty late)


LabRat been there.. done that =\ AVR's for me though not PIC.


New Member
Well, now I know what has been much frustration to me. Thought I was handling MCLR wrong somehow, but it was "intermittent". Now I know...
Not open for further replies.

Latest threads

EE World Online Articles