Question on DT_INT


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Question on DT_INT

    I am using DT_INT in my code, I am using RB0 -external interrupt. I never had problem before using interrupts of other types, but this external interrupt is causing problem

    It works sometimes upto 4 times (i.e. 4 x RB0 interrupts) then stops working by itself. Sometimes it works upto 2 times or three. There is no statement in the code which is disabling it or anything like that.

    Has anyone faced any similar problem?
    ___________________
    WHY things get boring when they work just fine?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Question on DT_INT

    What is the extenal circuit.?
    As usual the code may help.
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Question on DT_INT

    It seems the problem is resolved for now, the problem was that, the following was in the ISR:
    Code:
    					DEBUG "AT+CMGS=",34,STR ph1\13,34,",[145]",13,10
    					DEBUGIN 10000,Inform,[WAIT(">")] : pause 300
    					DEBUG "Intrusion", 26,10
    					Pause 10000 : error11=0
    For some unknown reason the above statements were causing the problem. I have now taken them out of the ISR and placed them under a separate label. I only increment a simple variable in the ISR now. The main code looks after that variable, when it gets increments the above statements gets executed.
    ___________________
    WHY things get boring when they work just fine?

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Question on DT_INT

    As a general rule you will want ti get in and out of an ISR as quick as possible, do only what is needed.
    The above code was probably taking too much time causing a trigger to be missed.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default Re: Question on DT_INT

    Quote Originally Posted by mackrackit View Post
    As a general rule you will want ti get in and out of an ISR as quick as possible, do only what is needed.

    _______THIS!
    Steve

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

Members who have read this thread : 1

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