Interrupt status?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156

    Red face Interrupt status?

    I have a program using 4 different DT_INTs, and to be honest, it's getting a little hairy.

    I've sort of lost track if an interrupt is enabled or disabled. Is there a quick (lazy) way for me to tell if an interrupt is enabled or disabled?

  2. #2
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Re: Interrupt status?

    Bulldoze the code, and rewrite it.

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Interrupt status?

    Read the INTCONx registers.
    Charles Linquist

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Interrupt status?

    I've usually had very little reason to ever disable them once enabled.
    Are you doing something really complex?

    The Flags, enable and priority bits can be made available if needed, using the INT_INT constants.
    DT

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Interrupt status?

    In some cases, it is useful to save INTCON0 into a variable, and then clear INTCON0.

    When you want to turn on the interrupts again, restore INTCON0. That way, you don't turn on interrupts that weren't on in the first place.
    Charles Linquist

  6. #6
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Re: Interrupt status?

    Oh, thanks very much for that Charles and Darrel. The board is part of a security system board, and didn't start out complex, but seems to be getting that way. I have two uart interrupts and hardware interrupts, and am having some conflicts in the sense that at the moment they are interfering with each other. I'm doing some serious debugging next week when I get back in front of the hardware, and hope to sort some of it out then.

    Have I overlooked something about the INT_INT constants? Where to find out more on this?

    Thanks again!

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