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


+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2013
    Posts
    546

    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,283

    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
    546

    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,162

    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
    2,973

    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 more tolerate and can be much driven slower enough for any PIC to handle.

    Ioannis

Similar Threads

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

Posting Permissions

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