# Program works fine in debug mode, but not in release mode - Where do I start?

Status
Not open for further replies.

#### cyrusthevirus

##### Newbie level 4
I created a very simple program and it works fine in debug mode, the LED never turns on in release mode. I am sure it is something simple, but I can not find it.

I am using a PIC24F, PICKIT3 and MPLAB.

Thanks for eveyone's help.

Code:
//***************************************************/
//***************************************************/

#include "p24FJ128GA110.h"

//***************************************************/

int main (void)
{
//ANi as digital I/O

TRISB=0b00000000;;
while(1)  //run clock
{
LATBbits.LATB6 = 1;
}
}

//end of code

#### john blue

Are you using ICSP? That is your programmer connected to your application or development board. If it has, you need to go to Programmer -> Release from reset.

#### cyrusthevirus

##### Newbie level 4
Are you using ICSP? That is your programmer connected to your application or development board. If it has, you need to go to Programmer -> Release from reset.

Yes it is connected, but wouldn't a powering down and up of the chip do the same thing?

#### john blue

Nope. It's different. Does it work? As I have experience that the release from reset is set in MPLAB and my program in the PIC cannot start running. After the release from reset is cleared, then it works fine,

#### cyrusthevirus

##### Newbie level 4
I got it. It ended up to be very simple. I did not add a 10K reistor between MCLR and VDD. Thanks for everyone's help in troubleshooting this.

Status
Not open for further replies.