No It isn't the watchdog, I've disabled that.
What I mean when I say nothing happens is that the delay "dissapears". The rest of the application works just fine.
What I'm trying to accomplice is to tunr a diode (RB2) on for a second with the push of a button (RB0). The diode is turned on but as soon as the button is released the diode is turned off. I've tried to make it blink by using a delay but then it's lit or turned off (depending on how i set it up) all the time.
Here is my complete code:
asm __config _LP_OSC & _WDT_OFF & _PWRTE_ON & CP_OFF
#pragma CLOCK_FREQ 4000000
void main( void )
set_bit( STATUS, RP0 ); //Select the Register bank 1
set_tris_a( 0x00 ); //Configure the Port A
set_tris_b( 0x01 ); //Configure the Port B
OPTION_REG = 199; //Configure the OPTION register
clear_bit( STATUS, RP0 ); //Select the Register bank 0
INTCON = 160; //Configure the INTCON register