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

Thread: OctoWS2811 generates bad timings

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    3

    OctoWS2811 generates bad timings

    Quick overview: OctoWS2811 turns all my LED's white. When I look at the timings with an oscilloscope, they do not at all match those specified by the WS2811 datasheet. The Neopixel library works fine, and generates timings as specified by the WS2811 datasheet.

    I wired up a Teensy as instructed on the OctoWS2811's library page.
    I downloaded the OctoWS2811 example program called "BasicTest" to my Teensy. When it ran, it turned all of my LED strips white!
    Even when I changed the program to just set all pixels to 'off' they stayed white.
    These strips and this Teensy are known to be good: I can drive them with Adafruit's NeoPixel library.
    The strips I'm using are 400KHz strips.
    My output signal is being routed through a 74HC245.

    Figuring something was wonky, I took a look at the output signal with my oscilloscope.

    These are the bit timings I found with my oscilloscope:
    Code:
    OctoWS2811 Output
    bit:	ns
    ?H	1700
    ?L	800
    ??H	600
    ??L	1900
    
    
    NeoPixel Output
    Bit:	ns
    0H	500
    0L	2000
    1H	1150
    1L	1350
    
    
    Timings specified for 400KHz mode on the WS2811 datasheet: (+/-150ns acceptable)
    Bit	ns
    0H	500
    0L	2000
    1H	1200
    1L	1300
    Another strange thing I found is that even when I tell OctoWS2811 to set all pixels to white, (e.g. all bits should be 1's) or all pixels to off (e.g. all bits should be 0's), my oscilloscope still finds two distinct bits in the output signal, so I'm not sure which bit is supposed to be 1's and which is supposed to be 0's. I have observed this behavior on just two of the three Teensy's I've tested, which is curious in and of itself...



    Here's the test code I'm using:
    Code:
    #include <OctoWS2811.h>
    
    const int ledsPerStrip = 60;
    
    DMAMEM int displayMemory[ledsPerStrip*6];
    int drawingMemory[ledsPerStrip*6];
    
    const int config = WS2811_GRB | WS2811_400kHz;
    
    OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
    
    void setup() {
      leds.begin();
      leds.show();
    }
    
    void loop() {
      int microsec = 2000000 / leds.numPixels();  // change them all in 2 seconds
    
      // uncomment for voltage controlled speed
      // millisec = analogRead(A9) / 40;
    
      colorWipe(0x000000, microsec); //set color here to 0xFFFFFF to try 
    }
    
    void colorWipe(int color, int wait)
    {
      for (int i=0; i < leds.numPixels(); i++) {
        leds.setPixel(i, color);
        leds.show();
        delayMicroseconds(wait);
      }
    }


    I'm at a loss as to how to precede from here. I'd appreciate it if anyone has ideas for debugging, or if someone experienced with the Octo library could chime in and let me know if I'm doing something stupid.

    Thanks in advance.

  2. #2
    Junior Member
    Join Date
    Aug 2013
    Posts
    3
    Derp, I hadn't connected pins 15 and 16.

    Works great now!

  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    3
    Note to self: RTFM carefully

Posting Permissions

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