OctoWS2811 generates bad timings

Status
Not open for further replies.

turumbar

New member
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.
 
Status
Not open for further replies.
Back
Top