Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 1 of 1

Thread: How to set interrupt priority for DmxReceiver

  1. #1

    How to set interrupt priority for DmxReceiver

    I am using DmxReceiver successfully for a 20 channel DMX dimmer.
    The same Teensy 3.1 is used to do AC Light Dimming but i see flicker once i a while in the lights.
    There is no flicker if i command out all the DMX stuff.
    So, i am guessing the interrupt routine in the DMX library prevents the Teensy from noticing the zero cross interrupt ?

    Pin2 listens to the zero crossing of the AC signal via
    Code:
    attachInterrupt(zeroCrossPin, zero_crosss_int, RISING);
    when the zero cross interrupt is detected the elapsedMicros timer is set to 0

    every 30 ms i check if the elapsedMicros equals the dimming value/time i want and then set the dimming PIN high.

    i thought maybe setting the interrupt priorities differently would help???
    i know i can set interrupt priorities for interrupt timers but can't find out how to set priotities for interrupt pins.

    thanks,
    stephan.

    here is the code:
    https://gist.github.com/antimodular/...1a1aa951a4b514
    Last edited by stephanschulz; 04-29-2015 at 07:09 PM. Reason: more thoughts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •