Interrupt OPTION
I'm using "INTERRUPT 1000" so the SX will perform a task every 1ms and compiler sets the·OPTION for me
Now I need to disable the INTERRUPT·to initialize·other devices then I want to re-enable·the interrupt·again
I used this commands to disable the interrupt
·· temp=option
···temp=temp ^ %01000000
···option=temp
'
'
'
and I used this to re-enable it:
·· temp=option
·· temp=temp & %10111111
·· option=temp
when I use this commands set after the "Start:" label and before "Main:" label, the SX, hangs and does not work and I cannot even debug it!!
the debug freeze and never gives me the options to run of walk,.... (even-if I used the break command)
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
·How can I disable the INTERRUPT then re-enable it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Now I need to disable the INTERRUPT·to initialize·other devices then I want to re-enable·the interrupt·again
I used this commands to disable the interrupt
·· temp=option
···temp=temp ^ %01000000
···option=temp
'
'
'
and I used this to re-enable it:
·· temp=option
·· temp=temp & %10111111
·· option=temp
when I use this commands set after the "Start:" label and before "Main:" label, the SX, hangs and does not work and I cannot even debug it!!
the debug freeze and never gives me the options to run of walk,.... (even-if I used the break command)
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
·How can I disable the INTERRUPT then re-enable it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
Okay there IS a secret instruction that will read the option registers.
Try replacing "temp = option" like this:
\ DW $001 ' Put OPTION register into W "secret instruction"
\ MOV temp,W
temp=temp ^ %01000000
option=temp
\ DW $001 ' Put OPTION register into W "secret instruction"
\ MOV temp,W
temp=temp & %10111111
option=temp
I don't know if this will work, but in theory it should.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·