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 Header File
//***************************************************/
#include "p24FJ128GA110.h"
//***************************************************/
int main (void)
{
//ANi as digital I/O
AD1PCFGH = 0xFFFF;
AD1PCFGL = 0xFFFF;
TRISB=0b00000000;;
while(1) //run clock
{
LATBbits.LATB6 = 1;
}
}
//end of code
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.
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.
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,