SX/B interrupt disable
Rsadeika
Posts: 3,837
I have attached a program that can be used as a starting point. My question, after reading through the SX/B help file I did not notice a command or an instruction that disables the interrupt after an option = $xx has been implemented. So, for example, in my program, how would I disable the interrupt while the pulsin subroutine runs, and then how would I turn the interrupt back on.
thanks
Ray
thanks
Ray
Comments
If you using OPTION=$88 to enable interrupts then OPTION=$C8 will disable interrupts.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
"People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
·
Do you have Gunther's book? As others can testify, it is a very handy reference. On page 225 of the second edition he makes clear that bit 6 of the Option register is the "main switch" to turn interrupts on or off. (0 = Enabled, 1 = Disabled) For your code, this is the Option bit that you need to change.
To turn interrupts on use:
OPTION = %10001000
To turn interrupts off use:
OPTION = %11001000
Those are the same as the hex values given by Bean. I wanted to explain a little how they were obtained. Obviously the other bits in the Option register have meaning as well, so be sure to check those out if they are of interest.
- Sparks