I has flag increment evertime when timer interrupt active, as simple code below
my "do_my_jobx" routine run many time until bit clear
How can I call funtion only one time, and wait until next set ?
my "do_my_jobx" routine run many time until bit clear
How can I call funtion only one time, and wait until next set ?
Code:
;any Pic with timer interupt will do
;timer interrupt
;save W,STATUS ,clear TMR0F
[COLOR="Blue"] incf flag[/COLOR]
;restore STATUS,W
;RETFIE
mainloop
btfss flag,0
goto next01 ;no bit set go next
call do_my_job0 ;else do my job, I want one time only
next01 btfss flag,1
goto next0x
[COLOR="Red"] call do_my_job1 ;I want do_my_job one time till next set[/COLOR]
next0x btfsc flag,7
call do_my_job2 ;I want do_my_job one time till next set
goto mainloop
do_my_job0
nop
do_my_job1
nop
do_my_job2
nop
return