WS2812b and similar LEDs - do we need all time running tight loop for control?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2013
    Posts
    1,078

    Default WS2812b and similar LEDs - do we need all time running tight loop for control?

    Hello.

    I've checked code examples found here, and by my understanding, I see that it is required to send tight timed pulse signals for those leds, which some folks done via assembly. So my question is as follows. I have some code running which does a lot of things, like reading DS3231, 18B20, driving nixie tubes, etc. I have idea to use WS2812b leds as configurable blinking separator. So I need it to be on for 500ms, off 500ms. Color defined once, by user, at startup. So I need constant running code to keep it turned on, or I just send burst of pulses, turn it on, then do my things, then again send code for off, and can do my things?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: WS2812b and similar LEDs - do we need all time running tight loop for control?

    You don't have to refresh them continously, it's enough to update the string of LEDs when you need/want something to change. Just realise that in order to change one of the LEDs in the string you will have to send data for the whole string.

  3. #3
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: WS2812b and similar LEDs - do we need all time running tight loop for control?

    Thanks, I only will have two of such leds, and both should display same color. So what if I connect their inputs in parallel?

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


    Did you find this post helpful? Yes | No

    Default Re: WS2812b and similar LEDs - do we need all time running tight loop for control?

    Yes, That can be done as I have paralleled up to 8 strings of 30 pixels each.
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,793


    Did you find this post helpful? Yes | No

    Default Re: WS2812b and similar LEDs - do we need all time running tight loop for control?

    The WS2812 have need fast pulses and your PIC should be fast as well.

    The APA101 are much more tolerant and can be driven slower enough for any PIC to handle.

    Ioannis
    Last edited by Ioannis; - 20th January 2022 at 18:02.

Similar Threads

  1. Replies: 27
    Last Post: - 9th April 2015, 05:51
  2. Multiple LEDs and Time Coount
    By LexManos in forum General
    Replies: 4
    Last Post: - 24th July 2009, 07:36
  3. DT Interrupt and Elapsed Time Running Slow
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th May 2009, 19:00
  4. Code to control 4 LEDs and 2 servos
    By The Master in forum Off Topic
    Replies: 2
    Last Post: - 26th November 2008, 14:33
  5. Closed loop control
    By BobEdge in forum General
    Replies: 0
    Last Post: - 16th February 2005, 10:49

Members who have read this thread : 1

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