Darrel Taylor - Instant Interrupts-Problem 16F877A


Closed Thread
Results 1 to 14 of 14

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    It looks like you've put the includes in there twice.
    DT

  2. #2
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Yes that's true. I just figured that out few minutes ago only. My code is streched so long that it's getting difficult to spot small errors and also I can be excused because it's the first time I am trying to use your interrupts. Anyways, thanks for the reply.

    Can you please also brief me about T4 error? Though the Build succeed is appearing fine, but so is the error of T4. Should I try to reduce the code or the variables? Should I don't worry about it as far Build Succeed is there?Thanks

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


    Did you find this post helpful? Yes | No

    Default

    As long as none of the complex math or logical conditions are in the Interrupt handlers themselves, ...
    you can open the ReEnterPBP.bas file and comment the ERROR "Temp variables exceeding T4" line with a semicolon (;).
    DT

  4. #4
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    Quote Originally Posted by Darrel Taylor View Post
    As long as none of the complex math or logical conditions are in the Interrupt handlers themselves, ...
    you can open the ReEnterPBP.bas file and comment the ERROR "Temp variables exceeding T4" line with a semicolon (;).
    Just to understand it correctly, I want to ask you few more questions:

    1) Can I use the following statements:
    Code:
    ToggleLED1:
         goto main ' Is it ok to send the program to a label. Also no complex match or logical conditions here
    @ INT_RETURN
    
    main:
    'All complex code and calculations are here
    @INT_ENABLE INT_INT 'Can I place this statement here?
    @SLEEP 'Since my application is battery powered, so PIC to sleep if no command is present
    Goto main
    2) Will the next interrupt only be enabled after the code encounters @INT_ENABLE (Regardless of where I put it in the code)?

    BIG thanks for the help upto now.
    Last edited by Megahertz; - 22nd December 2009 at 14:59.

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


    Did you find this post helpful? Yes | No

    Default

    NO! That is not OK at all.

    And if all you want to do is restart the program after an interrupt, then you don't even need interrupts.
    <hr>
    Once enabled, interrupts will continue to fire.
    They do not need to be enabled again, unless manually DISABLED in your program.
    DT

  6. #6
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Question

    .... if all you want to do is restart the program after an interrupt, then you don't even need interrupts.
    Well, I don't think I can manage without interrupts. In my code the program waits for serial data on one pin from an RF receiver. And if RI pin of my modem attached to RB0 pin goes low, the code should check any sms received as well. So, interrupt is needed.

    Once enabled, interrupts will continue to fire.
    They do not need to be enabled again, unless manually DISABLED in your program.
    How I can do that-disable the interrupts (Is it by adding DISABLE before the code) ? and also can they be enabled again when needed by using @INT_ENABLE?

    Regards

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


    Did you find this post helpful? Yes | No

    Default

    ENABLE and DISABLE have no effect with DT_INTS.
    Those are only for ON INTERRUPT.

    With DT_INTS there are two commands ...
    Code:
    @  INT_ENABLE  TMR1_INT
    @  INT_DISABLE  TMR1_INT
    They can be used anywhere in your program.
    Once disabled, you will not receive any interrupts from that source or peripheral until you execute another @ INT_ENABLE.

    When you INT_ENABLE, the flag is automatically cleared so you don't get an interrupt immediately if the flag was set.
    <br>
    DT

Similar Threads

  1. Problem displaying data from GPS module & using 16f877a
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th April 2010, 11:27
  2. 16F946 Instant Interrupts problem
    By jderson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th April 2009, 23:20
  3. Darrel Taylor Interrupts I2C Problem
    By dcorraliza in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 26th March 2008, 03:13
  4. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 13:46
  5. using darrel taylor's instant interrupts
    By Michael Wakileh in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st July 2007, 05:07

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