I have found that running the setintflags off outside of the interrupt routine doesn't switch them off. It seems to work fine inside.
I found this with a routine were the end of the routine could either switch the interrupt back on or leave it off.
There is a work around that I haven't written up yet but seem kind of weird for it not to work outside the interrupt routine.
This is running on a 20x2, the entire code is too large to post and has not affect on this issue.
I found this with a routine were the end of the routine could either switch the interrupt back on or leave it off.
There is a work around that I haven't written up yet but seem kind of weird for it not to work outside the interrupt routine.
This is running on a 20x2, the entire code is too large to post and has not affect on this issue.
Code:
[color=Blue]setintflags [/color][color=Navy]%00010000[/color][color=Black], [/color][color=Navy]%00010000
[/color][color=Blue]do
if [/color][color=Purple]hserptr [/color][color=DarkCyan]> [/color][color=Navy]0 [/color][color=DarkCyan]or [/color][color=Purple]tempbyte0 [/color][color=DarkCyan]= [/color][color=Navy]10 [/color][color=Blue]then exit
loop
setintflags off
[/color][color=Green]'low shutter
'low focus
[/color][color=Blue]if [/color][color=Purple]lite [/color][color=DarkCyan]= [/color][color=Navy]1 [/color][color=Blue]then
high LEDs
end if
setfreq m8
[/color][color=Green]'reutrn to detector page
[/color][color=Blue]hserout [/color][color=Navy]0[/color][color=Black], [/color][color=Blue]([/color][color=Red]"page "[/color][color=Black],[/color][color=Red]"9"[/color][color=Black],[/color][color=Navy]$FF[/color][color=Black],[/color][color=Navy]$FF[/color][color=Black],[/color][color=Navy]$FF[/color][color=Blue])
endselect
return
interrupt:
setintflags off
[/color][color=Green]'sertxd ("Trig", 13,10)
[/color][color=Blue]if [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]0 [/color][color=Blue]then [/color][color=Green]'check for bulb setting
[/color][color=Blue]pause [/color][color=Purple]usvalue [/color][color=Green]'add pause if required
'pulsout flash, 10 'fire flash
[/color][color=Blue]if [/color][color=Purple]strobe_flag [/color][color=DarkCyan]= [/color][color=Navy]1 [/color][color=Blue]then [/color][color=Green]'check for strobe active
[/color][color=Blue]for [/color][color=Purple]tempbyte1 [/color][color=DarkCyan]= [/color][color=Navy]0 [/color][color=Blue]to [/color][color=Purple]strobes [/color][color=Green]'loop for number of srobes
[/color][color=Blue]pause [/color][color=Purple]strobe_dur [/color][color=Green]'wait for time between each flash
'pulsout flash, 10 'fire flash
[/color][color=Blue]next [/color][color=Purple]tempbyte1 [/color][color=Green]'continue loop
[/color][color=Blue]end if
end if
if [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]2 [/color][color=DarkCyan]or [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]6 [/color][color=DarkCyan]or [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]1 [/color][color=DarkCyan]or [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]5 [/color][color=Blue]then
[/color][color=Green]'mirror up, single shot
[/color][color=Blue]pause [/color][color=Purple]usvalue [/color][color=Green]'wait for delay time if needed
'high shutter 'open shutter - 0.055 second in single shot, or 0.054 if mirror up mode
[/color][color=Blue]if [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]1 [/color][color=DarkCyan]or [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]2 [/color][color=Blue]then [/color][color=Green]'chec for flash activation
'pulsout flash, 10 'fire flash if true
[/color][color=Blue]end if
if [/color][color=Purple]strobe_flag [/color][color=DarkCyan]= [/color][color=Navy]1 [/color][color=Blue]then [/color][color=Green]'check for strobe activation
[/color][color=Blue]for [/color][color=Purple]tempbyte1 [/color][color=DarkCyan]= [/color][color=Navy]0 [/color][color=Blue]to [/color][color=Purple]strobes
[/color][color=Blue]pause [/color][color=Purple]strobe_dur
[/color][color=Green]'pulsout flash, 10
[/color][color=Blue]next [/color][color=Purple]tempbyte1
[/color][color=Blue]end if
pause [/color][color=Navy]500 [/color][color=Green]'shutter needs a small activation period for reliable operation.
[/color][color=Blue]end if
if [/color][color=Purple]prg_flag [/color][color=DarkCyan]= [/color][color=Navy]7 [/color][color=Blue]then [/color][color=Green]'check for burst mode
[/color][color=Blue]pause [/color][color=Purple]usvalue [/color][color=Green]'wait if needed
'high shutter 'open shutter
[/color][color=Blue]pause [/color][color=Purple]burst_time [/color][color=Green]'hold shutter open for some time
[/color][color=Blue]end if
inc [/color][color=Purple]tempword1
[/color][color=Blue]if [/color][color=Purple]cont_flag [/color][color=DarkCyan]= [/color][color=Navy]0 [/color][color=Blue]then
let [/color][color=Purple]tempbyte0 [/color][color=DarkCyan]= [/color][color=Navy]10 [/color][color=Green]'set flag so holding loop exits
[/color][color=Blue]else
setfreq m8
[/color][color=Green]'send tempword1 to dislay
[/color][color=Blue]hserout [/color][color=Navy]0[/color][color=Black], [/color][color=Blue]([/color][color=Red]"taken.val="[/color][color=Black],#[/color][color=Purple]tempbyte3[/color][color=Black],#[/color][color=Purple]tempbyte2[/color][color=Blue])
gosub [/color][color=Black]nextion_stop
[/color][color=Blue]setfreq m64
let [/color][color=Purple]flags [/color][color=DarkCyan]= [/color][color=Navy]0 [/color][color=Green]'reset interupt flags
[/color][color=Blue]setintflags [/color][color=Navy]%00010000[/color][color=Black], [/color][color=Navy]%00010000
[/color][color=Blue]end if
[/color][color=Green]'sertxd (#hserptr,44,#tempbyte0,13,10)
[/color][color=Blue]return[/color]