My guess is the clock is running at 32768Hz so everything is 122x slower th= an you think. On 2011-06-18, at 12:56 AM, geetansh arora wrote: > sorry i missed some details which might be important in solving this > problem. >=20 > I started with my first project but it didn't worked so i decided to go b= ack > 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 del= ay > was set to 10ms. > CCS compiler demo version was used for compiling , 4MHz crystal oscillato= r > was used with 22pF capacitors and configuration bits 2F09 were entered in > PICKIT 2 v2.61 (not used in the code) >=20 > #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 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .