PAUSE and ASM interruots


+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    82

    Default PAUSE and ASM interruots

    Hi,

    I need some clarification about the behaviour of the PAUSE instruction (OR PAUSEUS) when an ASM interrupt occurs.

    First, will the interrupt be taken into account or ignored ?

    If taken into account will it immediatly terminate the PAUSE instruction or will it delay the execution of the remaining time of PAUSE until the ASM interrupt code is executed ?

    Thank you for your help.

    MikeBZH

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,616


    Did you find this post helpful? Yes | No

    Default 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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    82


    Did you find this post helpful? Yes | No

    Default 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

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,934


    Did you find this post helpful? Yes | No

    Default 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

Similar Threads

  1. Replies: 6
    Last Post: - 28th October 2014, 06:08
  2. Do I need a pause?
    By tazntex in forum Serial
    Replies: 21
    Last Post: - 29th August 2008, 04:32
  3. Pause
    By blue in forum General
    Replies: 7
    Last Post: - 29th December 2005, 14:24
  4. Pause for 0.055msec??
    By Koraki in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th August 2005, 15:11
  5. pause 0.5
    By detail in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th June 2005, 11:32

Members who have read this thread : 12

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts