is it possible to break PAUSE statement with multiple interrupts?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: is it possible to break PAUSE statement with multiple interrupts?

    And like I said, you basically can't without going to low level tricks. Instead my recommendation would be something like this:
    Code:
    Delay_ms = 1000
    GOSUB WaitHere
    
    WaitHere:
    For ms = 1 to Delay_ms
      Gosub CheckInputs
      PAUSEUS 900  ' Tweak this to get correct timing, value depends on execution time CheckInputs.
    NEXT
    
    RETURN
    
    CheckInputs:
    ' Do whatever here, but no pausing etc
    ' If the delay should be terminated set ms = Delay_ms which will then terminate the FOR-NEXT loop when it returns.
    RETURN
    /Henrik.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,132


    Did you find this post helpful? Yes | No

    Default Re: is it possible to break PAUSE statement with multiple interrupts?

    Oh, thanks, will give it a try.

Similar Threads

  1. help in pic Basic Pro "Break statement"
    By boscox in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th May 2012, 11:53
  2. PAUSE statement
    By PlantBob in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th January 2011, 14:17
  3. DT interrupts and Pause
    By Luckyborg in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th February 2009, 22:47
  4. Handeling multiple Interrupts
    By BobSpencerr in forum General
    Replies: 15
    Last Post: - 1st March 2007, 01:12
  5. Multiple HW Interrupts
    By Radiance in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th August 2003, 22:35

Members who have read this thread : 0

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