WS2801 all LEDs flicker on color change at longer lengths?

Hi,
I'm having an issue using longer lengths of ws2801.
Up to 87 LEDs they work fine, no flickering when changing colors, just smooth transition.
90 I get an occasional flicker.
92 the whole array starts flickering.
Static colors work fine, it's just the color change that flickers.

I need 98 for my project.

Tested multiple power supplies, it made no difference.
LED psu ground is connected to Arduino ground.
End of the strip is also connected to the PSU (disconnecting it made no difference).
Tested multiple Arduinos.

I'm using a simple fastLED based Adalight sketch.
To remove the flicker, it is enough to change the number of LEDs in the sketch, so I'm guessing it should not be a hardware problem. There is nothing weird on that part of the LED strip.

Link to the Adalight sketch

Do you have any suggestion what to try next?

I don't expect it to be a power supply problem. I expect it to be a code problem. Which you also already suspected:

is_this_taken:
so I'm guessing it should not be a hardware problem.

But please post code according to forum rules next time.

I suspect the math in the code is just taking to long.

PS goto is like the death sin in higher level programming. And I stopped looking at the code after seeing that because it makes code just plain unreadable.

septillion:
I don't expect it to be a power supply problem. I expect it to be a code problem. Which you also already suspected:But please post code according to forum rules next time.

I suspect the math in the code is just taking to long.

PS goto is like the death sin in higher level programming. And I stopped looking at the code after seeing that because it makes code just plain unreadable.

Hi,
Will do with the code tags next time, I wasn't really thinking about it.
The code has been wildly used on the net, so I didn't even look at it.

I got it to work, turns out I wasn't using the hardware SPI pins on my (Arduino 328p, data 11, clock 13).

As soon as I switch the pin assignment, it's working fine.
FastLED library automatically uses hardware SPI if connected to the proper pins.

Oh, well, live and learn.

Then it was indeed a software problem. The fact it needed to do SPI in software as overhead :wink:

But code with goto, ugly as frick....