Addressable RGB LED's & LED strips


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    The translation for the data sheet is a little difficult to follow, it would be nice if there was a better explanation.

  2. #2
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    Quote Originally Posted by DavidK View Post
    The translation for the data sheet is a little difficult to follow, it would be nice if there was a better explanation.
    Agreed! I will have a string on Friday to play with.
    Shawn

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    SPCW pointed this thread out to me on mine, so, i'll fetch what i've got over here...

    I purchased 10 of the little chips off ebay. Becarefull with the chips when soldering them as they are extremely sensitive to heat... I think i've killed 4 out of the 10

    The constant current chip is the WS2811. The chip itself has two speeds, 400KHz or 800KHz. the WS2812 runs at 400KHz and the WS2812B runs at 800KHz.
    Communication to these devices is via a daisy chain with a NRZ type wave form. Each chip has 3 channels with 8 bit PWM.
    So, at 800KHz to send a 1 bit you send a high pulse of duration 0.8uS and the a low of 0.45uS.
    To send a 0 bit you send a high pulse of durations 0.4uS and then a low of 0.85uS.
    Total bit lenght is 1.25uS +-300nS
    The timing tolerances are +-150nS

    Now, the arduino's run entire strings of these things with the MCU running at 8MHz so one would think a 64MHz 18F46K22 would not have an issue...

    However, when i kick out a sequence manually like this...

    Code:
        LATD.0 = 1
    ASM
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;10
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;20
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;30
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;38
    
    
    ENDASM    
        LATD.0 = 0
    ASM
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;10
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;20
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
        nop
    ;29
    
    ENDASM
    Everything works fine. Even using GOSUB's to the on and off bit subroutines works without an issue after a little trimming by trial and error (as above).
    However, as soon as i use any sort of IF statement to read from an array, all the timings seem to go out the window and i can not adjust it enough to compensate.

    My calcs say that the 46K22 @ 64MHz makes 64 instructions per uS.
    Even if i cut off all the NOP's from the off time trailing sequence the pic still can not make the calculations (IF condition) within the required time.

    I have tried everything i can think of so far...

    I look forward to people's responses.

  4. #4
    Join Date
    Apr 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    Hi, everyone have a example how to use the WS2812 with a PICBASIC and Microchip microcontroller? Thanks!!!!

Similar Threads

  1. RGB led driver ic lpd6803
    By m_flfl in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th July 2012, 21:35
  2. RGB led driver ic lpd6803
    By m_flfl in forum General
    Replies: 0
    Last Post: - 29th May 2012, 20:49
  3. Free LED lights and LED strips
    By mistrip in forum Adverts
    Replies: 0
    Last Post: - 18th May 2012, 05:44
  4. RGB LED driver, Any comments?
    By paxmowa in forum Schematics
    Replies: 31
    Last Post: - 7th March 2012, 22:52
  5. RGB LED Matrix
    By ERIK in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th June 2008, 08:01

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