Re: PAUSE and ASM interruots
Hello, Brittany
an asm not masked interrupt will immediatly jump to ( generally ) location 4 of the program ... whatever the program is doing !
that done ... a "classic" interrupt stubb will jump back to the remaining time of the PAUSE ( or Pauseus ). So no Delay guaranteed for the PAUSE statement ...
BUT some tweaking can keep the PAUSE Length ( if possible ) : you have to substract the interrupt duration from the PAUSE PBP used internal counters ...
Flankly ... your question needs to much better explain the context ... as it's not " crystal clear " !
Alain
Re: PAUSE and ASM interruots
Hi Alain,
Thank you for your answer which is perfectly clear.
About the context :
I have a permanent repetitive loop which successively calls several subs, always in the same order. This loop, wrotten in PBP, is periodically interruoted by an ASM program, There is no relation between the loop and the interrupt frequencies. Loop : about 2.5 kHz, interrupt : about 60 kHz.
I want to slow down this loop so the simplest way would be to add some PAUSE inside. So my question was: "What occurs if an interrupt comes when a PAUSE is being executed".
The loop duration is not critical at all, so the behaviour you describe should be appropriate.
Thank you for your help
MikeBZH
Re: PAUSE and ASM interruots
Pause is a PicBasic command.
This command can be interrupted just fine with an ASM interrupt. But you have to be careful to save and restore critical registers during the ISR execution.
The problem is evident in PicBasic On Interrupt system, because the Basic Interrupt will be executed after Pause has finish.
Ioannis
Re: PAUSE and ASM interruots
Can I ask something related to this? Or should I start my own thread?
Re: PAUSE and ASM interruots