Question about DT's Interrupts


Results 1 to 7 of 7

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Hi,Tazntex

    Sleep can work in two manners ...

    1) whithout interrupts

    ahaaaaa ... here, you just have to re-arm the interrupt flag (RBIF )- but not valid IOC interrupt ( RBIE )

    in this case, the program stops @ sleep line and, when awaken, continue from there. here, the NOP added is necessary ...

    2) With interrupts enabled ( RBIE valid )

    the program stops @ sleep, but jumps to location 4 ( interrupt header ) when awaken ...

    so, both cases can be used ... and you can choose the one you have better !!!

    just depends on what you want to do.


    For the example you show ... interrupts are not necessary at all ...

    just place the sleep command at the beginning of the program ..., and if awaken, program will continue with treating your input ...

    then a " GoTo siesta " will re-enter sleep ...

    can be placed in a whole " While -wend " infinite loop too ...

    Alain
    Last edited by Acetronics2; - 22nd May 2010 at 22:42.
    ************************************************** ***********************
    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 " !!!
    *****************************************

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