When I program a 12F675 in a PICKIT 1 with the following code, it doesn't flash. I take this to mean it's stuck in the rampon loop, because it flashes when i comment out that one method call. I have no idea why this would be, or if it's the case--can anyone lend some insight?? Thanks!! btw--the code is supposed to fade the LED on and off. #include #define ON 0b00100000 #define OFF 0b00000000 void rampoff(int time); void rampon(int time); void delay(int msec); double i; int rampcounter; int x; int y; void main(void){ ANSEL = 0x00; TRISIO = 0x00; rampon(100); while(1){ GPIO=ON; delay(1000); GPIO = OFF; delay(1000); } } void rampon(int time){ for (i = 0; i < 30; i++){ for (x = 0; x < time; x++){ GPIO = ON; delay(i); GPIO = OFF; delay(15); } } } /*void rampoff(int time){ for (; time > 0; time--){ for (i = 0; i < 100; i++){ GPIO = ON; delay(i); GPIO = OFF; delay(1); } } } */ /* void delay(int msec){ for (i = 0; i < msec; i++){ for (x = 0; x<4; x++){ for (y = 0; y<16; y++){} } } } */ void delay(int msec){ for (i = 0; i < msec; i++){ NOP(); } } -- View this message in context: http://www.nabble.com/seem-to-be-stuck-in-a-loop-tp17682555p17682555.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist