Disable/Enable DT interrupt


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Re: Disable/Enable DT interrupt

    You can use the macro's
    @ INT_ENABLE TMR1_INT
    @ INT_DISABLE TMR1_INT
    I have a chunk of time critical bit banging code for driving WS2811 LEDs so I cant allow it to be interupted.

    If I do the following.....
    Code:
    @ INT_DISABLE    TMR1_INT
    {whole chunk of time critical code}
    @ INT_ENABLE    TMR1_INT
    Would TMR1 be able to flag an interrupt that would then be picked up when I re-enabled the DT Interrupt or would I miss that event completely ?

    Thanks in advance.

    Keith
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: Disable/Enable DT interrupt

    In general yes, but that depends on the version of DT-INTS you're using. Some of the ones I've seen clear the IF bit in INT_ENABLE, others don't.

    Might be easier to just set/clear the TMR1IE bit yourself (It's normally bit 0 of PIE1). If the TMR1IF bit is set when you set TMR1IE it'll generate an interrupt.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Disable/Enable DT interrupt

    Keith, I did the exact same thing when I wrote code some years ago for the WS2811 LEDs. That is the reason I switched to using the APA102C led's as they are SPI based and there is no need to disable the interrupts. In fact I just finished a table lamp for my daughter using 204, APA102C's and 29, 5.25 inch hard disk platters.
    Attached Images Attached Images  
    Dave Purola,
    N8NTA
    EN82fn

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Re: Disable/Enable DT interrupt

    Thanks Tumbleweed, will do some experimenting when I get home.

    Love the lamp Dave. Looks really cool.

    I am using WS2801, WS2811, APA102 and some PL9823 LEDs in a project. Will post pictures once its complete.
    Keith

    www.diyha.co.uk
    www.kat5.tv

Similar Threads

  1. Disable/Enable in Interrupts
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th June 2015, 07:47
  2. 4x40 LCD Display Enable Pin
    By rsocor01 in forum General
    Replies: 2
    Last Post: - 10th August 2011, 02:50
  3. PIC 16F616 Interrupt Enable/Disable?
    By Tobias in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 17th May 2009, 08:17
  4. Enable and Disable in Interrupts
    By stevecrunch in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th October 2007, 01:10
  5. ENABLE command not always mandatory?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd October 2006, 18:11

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