keith1200rs,
Thanks for your continuing support.
I tried increasing the delay. and when runinng the MPLAB SIM I am able to see the bit change after putting necessary breakpoints. But in the simulator logic analiyser its allways high. Even after programming the chip, the LED is allways glowing, not blinking. (New C code is pasted below)
One thing i observed is that after a delay call when i am changing the bit (Port value) ,its not actually getting changed.
Ichan,
The watchdog timer bit is Off, [ __CONFIG(0x3FF0);]
Regards
Bipin
#include <pic.h>
#include <HTC.h>
__CONFIG(0x3FF0);
void delay(void);
void main(void) {
TRISB = 0x00;
while (1)
{
PORTB = 0b00000001;
delay();
delay();
PORTB = 0b00000000;
delay();
delay();
}
}
void delay(void) {
unsigned int i,j,k;
for (i=0; i<100; i++)
{
for (j=0; j<1000; j++)
k=j; //just to waste time
}
}