I'm back to using some WS2801 strips I have but am for some reason

I’m back to using some WS2801 strips I have but am for some reason stuck at 24fps for 544 pixels. I should be getting 1000000/(544*24) = 76fps at 1Mhz correct?

This is on a Teensy 3.0 with RC3 and RC4:

#include “FastSPI_LED2.h”
#define p(…) Serial.print(VA_ARGS)

#define NUM_LEDS 544
CRGB leds[NUM_LEDS];

void setup() {
delay(2000);
FastLED.addLeds<WS2801, 2, 14, BGR, DATA_RATE_MHZ(1)>(leds, NUM_LEDS);
}

int startTime = millis();
int iter = 0;
void loop() {
if (millis() - startTime > 3000) {
p(float(iter) / (millis()-startTime) * 1000); p(" fps\n");
startTime = millis();
iter = 0;
}

FastLED.show();
iter++;
}

You’re using the software spi engine - I haven’t recalibrated the data rate to the current state of the code, so it is possible that it is running slower. You can see how it is if you bump the data rate up a bit. I’ll revisit the software spi data rate in a bit.

Also, you can’t go by the first set of frame rate numbers you get - as startTIme will likely get set before setup is even called, which means you’ll have an extra couple seconds of time where frame data wAsnt getting written out.

Either setting start time at the end of setup or making it a static local inside of loop would likely be better.

Thanks, that was it. Turns out I can crank it up to DATA_RATE_MHZ(4) (these leds previously only worked up to 1Mhz) which provides better speeds.

As mentioned, when using the hardware SPI support, the DATA_RATE_MHZ is a pretty close to exact match - I need to recalibrate the software SPI to better line up to the DATA_RATE_MHZ selected. The WS2801’s absolutely get pissy if you push data faster than 1Mhz at them, but it looks like the software SPI is off by a factor of 4, give or take. That’s going to be a bit more of a pain to calibrate than the other timing related stuff that I do in there.

(Somewhat relatedly, I can’t wait until the ws2801 dies off. The LPD8806 doesn’t have the ws2801’s data limitations, and you can just let SPI go as fast as you can push it, at least with current MCUs, i’m sure there is a max data rate - but I’ve gone over 20Mbps with it :slight_smile: