Replies: 12 comments 3 replies
-
Yeah, there are some things you did wrong. Let's start at the top with chip, the UCS7604. The only spec on found really doesn't describe the header in detail, mentions gain values and a mode setting; but not enough to even attempt defining it or even sizing it. It does sound like the header is optional though. Where did you get your information for what is in the header? From capturing from a functional controller? You mention using the NeoRgbw64Feature, does this mean you plan to use the UCS7604 is a 16bit per color element? 0-65535 rather than 0-255? By that lackluster spec, it hints that it can accept bits of 8/12/14/16. Doesn't really mention which is the default; let alone how to set this. The Tlc59711RgbwFeature is a better but simple example to start with. It is a 16bit per color feature that has a custom settings object. Copy it and the replace the code for updating the settings with yours. That part looked fine in your attempt. If you plan to expose the current settings, then the settings object has to be derived from NeoRgbwCurrentSettings. There are examples using this, but most are more complex to support arbitrary pin outputs to color mapping. The UCS7604 has specific pin to color so it could be a little simpler. |
Beta Was this translation helpful? Give feedback.
-
Not sure why, but I had seen you posted some screen shots from your scope for a notification email from github, but I don't see them or that post here in github. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
For reference, here's the init data from a working controller : |
Beta Was this translation helpful? Give feedback.
-
So a few notes, WLED (client's requirement) is using an ancient and/or heavily stripped down hardcopy of NeoPixelBus, so there's no Tlc59711RgbwFeature or Neo4WordElements or other classes. I'm pretty sure that I'm not getting WLED's bus wrapper to ever call applySettings(), so I'm likely just looking at uninitialized memory / garbage in the settings header. I'll post an update for posterity when I get it working, but it's my code, not yours... and thanks for the help. |
Beta Was this translation helpful? Give feedback.
-
That's good news about the WLED dev. I got some noisy strobes of life this morning, but the header data is still not constant, so it's not surprising that the strip flickers. The settings data is sometimes correctly what I've hardcoded, and other times its exactly as pictured in the first capture I posted this morning, by eye: 0000_1010_0000_0000. Is there any way in the library to add mark's or spaces, currently? I love a good reversing project, so I'd be more than happy to wrap this up in a PR to support these chips if I get figure out what these settings values do... |
Beta Was this translation helpful? Give feedback.
-
On the Topic of the oscillating header: |
Beta Was this translation helpful? Give feedback.
-
It's an older ESP32-WROOM-32 module, with a ESP32-D0WDQ6 Xtensa chip. Unfortunately I don't have a smaller test code base spun up yet, as the gig is basically "please hack our stips working with WLED in two days" right now. No changes to NeoPixelBus from WLED's:
Hence I'm just adding the settings code on top of NeoRgbw64Feature in NeoRgbw64Feature.h right now. past begin, and constructors, I suspect there's something in show(), canshow(), or the setPixels() that I'm not doing right / needs tweaking. |
Beta Was this translation helpful? Give feedback.
-
Ok, I think I know what is going on. Due to the async nature of the RMT, it has two internal buffers, editing and sending. When you call SetPixelSettings() it updates the editing buffer. Now normally this isn't an issue, but I am sure that WLED is calling Show(false), which means to skip keeping the buffers consistent (copying between editing and sending). This means one of the buffers was not updated with the settings. So, to test if this theory is it, change the Show(false) to just Show(), or Show(true). This isn't the right solution, as this will incur some overhead. |
Beta Was this translation helpful? Give feedback.
-
Thank for the callout about the double buffering, I won't go into the messy details of the WLED wrappers around show(), but hardcoding What's more, after "discovering" a whole second word of settings data, I've got the UCS7604s working with NeoPixelBus! The settings packet format could use more testing, but I've definitely fuzzed out the color bitdepth, and number of output channels fields, with a strong guess at channel current limit fields too. Let me know if your not interested in adding support for these chips, otherwise look out for a PR this season. |
Beta Was this translation helpful? Give feedback.
-
I welcome all changes. Especially if we discuss the solutions beforehand like we are doing now. |
Beta Was this translation helpful? Give feedback.
-
@exitrip Master branch now contains a fix so that you don't need to change the Show() in WLED. |
Beta Was this translation helpful? Give feedback.
-
I guess this is technically a feature request, as I'm working on adding code, but the behaviour is buggy. I developing on Ubuntu, using VSCode's PlatformIO plugin, to build WLED images for an ESP32 WROOM-32. I don't think WLED or PIO has anything to do with the output I'm seeing. I cross posted this as an issue to be annoying.
Based on chips with "applySettings" methods, I'm testing a simple extension the
NeoRgbw64Feature
class to include a hardcoded 8 byte header to try to bring up a custom strip of UCS7604s. Absent a real datasheet, both the drivers that work with the strip frame the data string with FFFF_FFFF_FFFF_0003h, which is probably 3 current output + 1 a mode setting, but all I want to test right now is if the chips will accept this header.While I see consistent data output in pixel fields (pData after the 8 byte header, i.e. red is the red value, green is green value ), the 8 start bytes are oscillating back and forth between two values that have basically nothing to do with FFFF or 0003. I'll skip pictures of the LA captures for now, but is there some lower layer data mangling between applySettings() and the wire?
Beta Was this translation helpful? Give feedback.
All reactions