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

Thread: Teensy LC as DMX Receiver

  1. #1

    Teensy LC as DMX Receiver

    Hello,
    Is there any way to use a Teensy LC as a DMX receiver ?
    I tried to use jmParis code, but It doesn't works
    Thank you

  2. #2
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Yes, but you'll likely need additional hardware.
    Can you explain what you have tried and how you wired things up ?
    Also, a link to the code from jimParis would help.

  3. #3

  4. #4
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    If you had a Teensy 3.x you could try if it works with that.
    This next suggestion is just a guess. On of the includes in Jims code is
    Code:
    #include "mk20dx128.h"
    The Teensy LC does not have the mk20dx128 Arm microcontroller. Perhaps another include is needed.

  5. #5
    Unfortunately, I only have a teensy LC :/

  6. #6
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Another observation is that the Teensy LC does not have serial FIFO buffers, which the code from jimParis seems to use.

    So in essence I still think the Teensy LC should be able to receive DMX, just not with the code you've chosen.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,780
    The other issue on Teensy-LC is the lack of a separate interrupt for UART error status.

    Since this code was written, Teensyduino added an attachInterruptVector() function, which lets you override the interrupt functions in the core library. On Teensy-LC, that will be necessary, because the error conditions will trigger only the normal interrupt. Extra code will be needed in that normal interrupt to handle the framing error (which indicates the DMX start of frame break condition).

  8. #8
    Thank you Paul !
    So should I start a new Serial connexion at 250000 bauds and reinit it when the error occurs ?

  9. #9
    Junior Member
    Join Date
    Feb 2014
    Posts
    10
    https://github.com/chrisstaite/TeensyDmx just updated his library. TeensyLC is now working with it (and Teensyduino >=1.28)

  10. #10
    Senior Member
    Join Date
    Mar 2017
    Location
    Oakland, CA, USA
    Posts
    118
    Another library that works with the Teensy LC: https://github.com/ssilverman/TeensyDMX

  11. #11
    Senior Member
    Join Date
    Mar 2017
    Location
    Oakland, CA, USA
    Posts
    118
    I just fixed the DMX receive problems in the TeensyDMX v3.2.0 release. There's a new v3.2.1 release that I've tested on a Teensy LC. Note that the Arduino Library Manager or PlatformIO might not detect the new release because it's not on the `master` branch; you might have to download it from the Releases page and extract it on top of the v3.2.0 library. https://github.com/ssilverman/TeensyDMX

    The v4.0.0-alpha.1 release contains the same fixes, but some might be uncomfortable with "alpha" in the name.

Posting Permissions

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