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

Thread: TriantaduoWS2811, a 32-channel WS* library for Teensy 4.0 using FlexIO and DMA

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Location
    Hillsboro, OR
    Posts
    14

    TriantaduoWS2811, a 32-channel WS* library for Teensy 4.0 using FlexIO and DMA

    Here's a project I've been working on to generate 32 WS* channels of up to 1000 LEDs each, with zero processor overhead through the use of FlexIO and DMA and external shift registers. Some features:

    1000 LEDs per channel at 30 FPS, though the number of LEDs and frame rate can be traded off. 10 LEDs at 3 kHz should be attainable.
    Consumes three Teensy pins and zero processor time
    Double-buffered to reduce tearing artifacts with video
    Each channel is configurable for RGB, GRB, or GRBW
    If you're really nuts, you could probably fit three of these on a Teensy, for 96 total output channels. Right now it's hard-coded to FlexIO 1

    This would also be a good starting point for any project that needs a lot of outputs updated relatively (3.2 MHz) quickly, directly from RAM.

    Code and lots more details here:
    https://github.com/wramsdell/TriantaduoWS2811

  2. #2
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    210
    Ward awesome job! I commented on your facebook share as well.

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,091
    Great stuff!

  4. #4
    Junior Member
    Join Date
    Mar 2013
    Location
    Hillsboro, OR
    Posts
    14
    Thank you! In thinking about this some more, I'm tempted to do some more work with FlexIO and shift registers because it's just such a powerful combination. I *think* one could do 96 channels of PWM with 200ns resolution using 8 IOs: two clocks and 6 data lines. That would be an interesting feat.

  5. #5
    Junior Member
    Join Date
    Jan 2018
    Posts
    10
    Amazing, thank you!

  6. #6
    Junior Member
    Join Date
    Feb 2016
    Posts
    5
    This looks extremely interesting! Have you looked at extending it to a second flexIO for more outputs int the meantime? Also, is there an integration with FastLED already so I can save myself some work ?

  7. #7
    Junior Member
    Join Date
    Mar 2013
    Location
    Hillsboro, OR
    Posts
    14
    Nope, I've never investigated FastLED. Is it a front-end/back-end sort of thing where I could easily swap in my drive code and leverage the existing value manipulation functions?

  8. #8
    Junior Member
    Join Date
    Feb 2016
    Posts
    5
    I think so! I haven't really modified the library myself either, but I'm following several contributors who have, for example Yves Bazin, who wrote a similar parallel output library for the ESP32: https://www.reddit.com/r/FastLED/com...ws2812b_strip/

Posting Permissions

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