Code:Delay movlw D'6' movwf CounterC movlw D'24' movwf CounterB movlw D'168' movwf CounterA loop decfsz CounterA,1 goto loop decfsz CounterB,1 goto loop decfsz CounterC,1 goto loop retlw 0x00
Hi, i was recommended to picloops to write delay subroutines for timed delays. For this particular 1 sec delay, it was calculated to have a total of 1000002 machine cycles and hence a 1.0000020sec delay.
My main problem now is that how do we actually calculate the total number of machine cycles, i have run the program on the simulator and have a rough idea but i am unable to work out the maths for the whole number of machine cycles.
Pls help.Thanks.