peace for all of you
that is first try of me to help assembly programmers
it was so difficult for me to determine prametrs of delay before i decide
to make this program no its so easy with any clk frequancy
note the program calculate delay starting from call inst. to return inst.
to make delay
>>>
CALL DELAY
>>>
DELAY......MOVLW D'P1'
...............MOVWF T1
LP3..........MOVLW D'P2
...............MOVWF T2
LP2..........MOVLW D'P3'
...............MOVWF T3
LP1..........DECFSZ T3,1
...............GOTO ...LP1
...............DECFSZ T2,1
...............GOTO ...LP2
...............DECFSZ T1,1
...............GOTO ...LP3
...............NOP (MAY BE NOT EXIST IF 0 )
...............RETURN
note
in the program you use accurecy when you cann't get p1,p2,p3
as you increase accurecy as more nop instruction you put in delay as less time to find parameters
clk is in mhz not in htz
that is first try of me to help assembly programmers
it was so difficult for me to determine prametrs of delay before i decide
to make this program no its so easy with any clk frequancy
note the program calculate delay starting from call inst. to return inst.
to make delay
>>>
CALL DELAY
>>>
DELAY......MOVLW D'P1'
...............MOVWF T1
LP3..........MOVLW D'P2
...............MOVWF T2
LP2..........MOVLW D'P3'
...............MOVWF T3
LP1..........DECFSZ T3,1
...............GOTO ...LP1
...............DECFSZ T2,1
...............GOTO ...LP2
...............DECFSZ T1,1
...............GOTO ...LP3
...............NOP (MAY BE NOT EXIST IF 0 )
...............RETURN
note
in the program you use accurecy when you cann't get p1,p2,p3
as you increase accurecy as more nop instruction you put in delay as less time to find parameters
clk is in mhz not in htz