solidsnike
Member level 1
hiiii everybody
this is delay call function for 5 minutes but when i used on my pic16f84a and applyed my circuit it didnot operate >>>
i need konw what ia meaning by ( cblock ) in this code
and what is meanining by ($+2)
and thanks
this is delay call function for 5 minutes but when i used on my pic16f84a and applyed my circuit it didnot operate >>>
i need konw what ia meaning by ( cblock ) in this code
Code:
cblock
d1
d2
d3
d4
endc
and what is meanining by ($+2)
Code:
; Delay = 300 seconds
; Clock frequency = 4 MHz
; Actual delay = 300 seconds = 300000000 cycles
; Error = 0 %
cblock
d1
d2
d3
d4
endc
;299999995 cycles
movlw 0x54
movwf d1
movlw 0xA1
movwf d2
movlw 0xFD
movwf d3
movlw 0x02
movwf d4
Delay_0
decfsz d1, f
goto $+2
decfsz d2, f
goto $+2
decfsz d3, f
goto $+2
decfsz d4, f
goto Delay_0
;5 cycles
goto $+1
goto $+1
nop
and thanks