PIC with Automatic Context Saving


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: PIC with Automatic Context Saving

    Bruce, Thanks for the info re. IOCAF bank switching in the handler. Actually, I don't think I need that line of code anyway. As stated in the header, the test program is for one-time use only. The circuit works correctly as is.

    Hank, With two interrupt sources you would first go to the handler identified after DEFINE INTHAND. Once there, set up a test to determine which interrupt occurred by polling the interrupt flags. Then carry out the appropriate interrupt action. I have never done this, so maybe Bruce or Darrel could help with a better explanation.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: PIC with Automatic Context Saving

    Hint: BTFSS or BTFSC, or BIT?GOTO
    ;************************************************* ***************
    ;* BIT?GOTO : Macro - Bit test and Long Goto *
    ;* *
    ;* Input : Cstate = constant desired state for goto *
    ;* Regin = register *
    ;* Bitin = bit *
    ;* Label *
    ;* Output : None *
    ;* *
    ;* Notes : Preserves C, Z, handles page boundaries, resets bank.*
    ;************************************************* ***************
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: PIC with Automatic Context Saving

    16F1828 now working with two interrupt sources.
    BTFSS works well as a source selection tool ... thanks Steve.
    Automatic context saving feature of the chip working.
    End of story.

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