ws2811 clock #387
Replies: 7 comments
-
Posted at 2014-01-25 by Kim Thanks for this. The tutorial in http://www.espruino.com/Individually+Addressable+LEDs does mention that this might be needed, but it is rather hidden away and should be made more clear. Have you tried to address other lights from your LED strip? Oddly, it seems like I can set the colour of the first 2 or 3 but once I try and set the while string they all turn white, regardless of the colour I set. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-25 by Kim Actually, if you experience the same problem of all LEDs being white, I think it might have to do with this (pressing) issue! : |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-25 by Loop I was having white leds too, even more so by doing as the tutorial suggests (halving the baud rate); by doubling it I'm able to address all 25 of them, with just an occasional flickering. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-25 by Kim Hmm, good to know :). Seems like we will need some more trial and error to get these lights going. If you don't have those arrays, could it be that your board is on a version earlier than 1v46? If so, it might be good to tell Gordon that you don't have those issues as it will make it a lot easier for him to track down the bug. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-27 by @gfwilliams This is really odd - you're using the latest version (1v46)? But it actually all works fine at 6400000, rather than lighting some LEDs randomly? It's not an issue with the electrical connection is it? (like whether ground is connected to the Espruino board). I've tried several different sets of LEDs from the batch I sent out and they all worked at 3200000 - but I'll go and try some more just in case. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-03 by Loop Hello, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-02-04 by @gfwilliams It's not random - it's just that unlike something like the USART, it has a fixed clock divisor that's /2, /4, /8, /16, etc. Every Espruino board would be the same, however between different STM32 devices that have different clock speeds (eg, 48Mhz instead of 72Mhz), it could be quite different. At the moment it's just SPI MOSI that you can use (there are a few pins that do this) because the SPI hardware is used to get the fast pulses while the software works out what bytes to send. With some extra work on Espruino it'd be possible to send the data in software only (on any pin), but the idea is that eventually the SPI hardware can be sending the data out more or less automatically while Espruino can get on with doing more calculations. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-25 by Loop
Hello,
After some trial and error, which even lead to studying the exact timings the controllers wanted and trying send8bit with various bit patterns, I found out that just doubling your suggested clock rate works fine! That is on the kickstarted boards with the supplied led strip. So I use
The original 3200000 baud rate suggested never works for me!
Cheers,
Luca
Beta Was this translation helpful? Give feedback.
All reactions