sorry i missed some details which might be important in solving this problem. I started with my first project but it didn't worked so i decided to go bac= k and blink leds,now the problem is when the delay between on off was set 10ms the leds took 2.3sec(used a stopwatch n delay was approx. 2.3sec). At first delay was set to 500ms but it took too much time to blink so delay was set to 10ms. CCS compiler demo version was used for compiling , 4MHz crystal oscillator was used with 22pF capacitors and configuration bits 2F09 were entered in PICKIT 2 v2.61 (not used in the code) #include <16F877A.h> #use delay(clock=3D4000000) void main() { while(1) { output_D(255); delay_ms(10); output_D(0); delay_ms(10); } } please solve my problem guys. thank you and sorry again for missing the details in previous post. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .