Toggle program branch ussing interrupot by button?


Results 1 to 14 of 14

Threaded View

  1. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: Toggle program branch ussing interrupot by button?

    with PBP "on interrupt" it looks this figure is covered in the manual @ $ 5.66 ( RESUME xxx ) : you can choose the "return" adress xxx as you want ... so LOOP2 always completes.

    - also note if you do not clear the interrupt flag ( With a DEFINE ) you automatically re-enter the ISR when completed !

    - For DT interrupts ... I didn't check if the resume address can be freely chosen ...

    - last idea is simply to overwrite the interrupt return address on the stack ... ( with asm "push" and "pop" macros see midrange manual, interrupts chapter ), depending on the button state.

    Alain
    Last edited by Acetronics2; - 24th August 2013 at 09:38.
    ************************************************** ***********************
    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 " !!!
    *****************************************

Similar Threads

  1. TOGGLE will not go LOW
    By SUNFLOWER in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 10th August 2014, 16:53
  2. toggle switches and buttons-- need little help
    By electromark in forum General
    Replies: 2
    Last Post: - 25th October 2012, 22:35
  3. Toggle command
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2011, 02:07
  4. toggle or count?
    By earltyso in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th May 2008, 08:54
  5. BRANCH/BRANCHL for GOSUB
    By selbstdual in forum PBP Wish List
    Replies: 11
    Last Post: - 20th February 2007, 14:29

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