Question about data rates.

Question about data rates. I am working on a project the uses 4 lines of APA102’s driven by a Teensy 3.2. Not a lot of leds, only 55 per line. I found that I had to run the Teensy at 24 Mhz to get the APA102’s to respond at all. I am working on the details of the test animation (which runs as expected), and noticing that I get flickers of blue on leds that should be off. Always blue and very quick. I tried reducing the data rate in the AddLeds specification, and it reduced the rate of incidence, but did not solve the problem. So I am now running the Teensy at 24 Mhz, with the data rate for the APA102s at 5 Mhz and still seeing flicker, not sure what to try next.

Anyone got an insight to share?

How close is the teensy to the start of each LED strip? Grounds all tied together?

You also don’t mention how you’ve wired the leds - what pins/etc… (note - I never run the teensy 3.2 at anything below 96mhz in my

Sorry…I have been distracted by competing events today. The distance from the Teensy to the input connections is about 18 inches. All grounds (including power and teensy) tied together on a rail of a breadboard. Four separate data lines, one common clock line. Data on pins 20, 21, 23, and 6. Clock on pin 14.

Why not use the hardware SPI pins? See

Yes, I read that and considered it…but the project is a prototype for a sculpture that will need to scale, probably to at least six data lines. Seemed better to use separate lines from the beginning.

Do you have resistor on the data line, and a capacitor across the pos/neg inputs on each strip?

Also just out of curiosity, does adding a 2ms delay to the main loop change anything?

No resistors or caps. I thought that those were basically protective for neopixels, so left them off. I did try varying the timing of the fastLED.Delay call, with no obvious effect.

The caps help smooth out power fluctuations as LEDs come on/off quickly. Can be used with any type of LEDs.

Besides being protective, the resistor can help with ringing (reflections) in the data signal.

Thanks, good point. Doubt that the cap will matter, but the resistor might…will experiment tomorrow.

I think maybe the flickering was from a poor connection somewhere on the breadboard. I tried adding resistors on all 4 data lines, and that made the flickering brighter and more frequent, so I took them back out. In the process all the data pin connections got unplugged and replugged a few times. The flicker has disappeared.
So I tried backing out changes. No flicker if I run the APA’s at default data rate. I still can’t control the leds at Teensy speeds above 24 Mhz, which is strange in light of Daniel’s note, above. At higher speeds I just see random flashing colors at fairly low brightness.
I am going to proceed, working at 24 Mhz. Thanks for your time.

Just going to mention a few other things to confirm… You have all the grounds of everything connected together? And you’re using a level shifter (74HCT245N)?

Oh damn. My only previous Teensy project used the OctoWS2811 adaptor. It has a level shifter built in, doesn’t it? Thanks for bringing that up.

Please let us know if that sorts things out.

Level shifters added on data and clock lines. Now running happily at 96 Mhz with resistors on the data lines. It is still picky as to which data pins I use, so I suspect that the teensy has some defaults that I don’t know about, but using pins 6, 20, 21 and 22, with the clock on 14, it all works as expected. Thanks again for your help.