Hi all, I need help in understanding how I can disabile temporarely the DT interrupt on the serial receive (RX_INT) and Enable it as soon as the special event is ended.
Anybody has faced such a need before?
Cheers
Al.
Hi all, I need help in understanding how I can disabile temporarely the DT interrupt on the serial receive (RX_INT) and Enable it as soon as the special event is ended.
Anybody has faced such a need before?
Cheers
Al.
All progress began with an idea
You can use the macro's
@ INT_ENABLE RX_INT
@ INT_DISABLE RX_INT
or
set / clear the pie1.rcif bit yourself (usually pie1.5) but check your data sheet
Thank you Richard for the prompt answer. Just what I was looking for!
Cheers
Al.
All progress began with an idea
From a newbie - Where can I download virgin copies of the latest DT-Ints-18 AND ReEnterPBP-18? I've searched everywhere, can't find ReEnterPBP-18 at all. Using PBP3, PIC18F67K90 in a smart battery. Thanks...
You can tray at this link:
http://www.picbasic.co.uk/forum/showthread.php?t=19638
Cheers
Al.
All progress began with an idea
Thanks - that's just what I was looking for. Now the fun part...! Wish Darrel was still around. I'm trying to create I2C control commands in PBP3 for an interrupt handler (similar to CCS's C-code I2C_ISR_STATE, I2C_READ, I2C_WRITE).
Matthews I never used the Darrel I2C interrupt so I cannot help you. I did something with I2C few years ago, and I posted a working snippet in this thread http://www.picbasic.co.uk/forum/showthread.php?t=10141. In the thread you will find also some code using DT I2C interrupt that could help you to start with your new project.
Longing to see your working code posted!
Cheers
Al.
All progress began with an idea
I have a chunk of time critical bit banging code for driving WS2811 LEDs so I cant allow it to be interupted.You can use the macro's
@ INT_ENABLE TMR1_INT
@ INT_DISABLE TMR1_INT
If I do the following.....
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 ?Code:@ INT_DISABLE TMR1_INT {whole chunk of time critical code} @ INT_ENABLE TMR1_INT
Thanks in advance.
Keith
Keith
www.diyha.co.uk
www.kat5.tv
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.
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.
Dave Purola,
N8NTA
EN82fn
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
Bookmarks