hi guys can anyone help , i am trying to implement a delay of 1/2 of a second .can anyone tell me if the following routine will produce 1/2 of a second.please respond !!!
DELAY ; delay subroutine
MOVLW d'250' ; delay 250 ms ( 4 MHZ clock )
MOVWF COUNT0
D1 MOVLW 0xC7
MOVWF COUNT1
MOVLW 0x01
MOVWF COUNT2
DELAY_PROCESS
DECFSZ COUNT1,f
GOTO $+2
DECFSZ COUNT2,f
GOTO DELAY_PROCESS
DEFSZ COUNT0,f
GOTO D1
RETLW 0x00
DELAY ; delay subroutine
MOVLW d'250' ; delay 250 ms ( 4 MHZ clock )
MOVWF COUNT0
D1 MOVLW 0xC7
MOVWF COUNT1
MOVLW 0x01
MOVWF COUNT2
DELAY_PROCESS
DECFSZ COUNT1,f
GOTO $+2
DECFSZ COUNT2,f
GOTO DELAY_PROCESS
DEFSZ COUNT0,f
GOTO D1
RETLW 0x00