Hello there,
I am trying to control 2 LED strips (one with a WS2811 LED driver and one with a USC512C4 LED driver) with my STM32L4 with integrated RS485.
Do you have any idea how to do this?
Best regard.
P.Congré
Hello there,
I am trying to control 2 LED strips (one with a WS2811 LED driver and one with a USC512C4 LED driver) with my STM32L4 with integrated RS485.
Do you have any idea how to do this?
Best regard.
P.Congré
I should have added that there's also useful material about DMX512 here on the community. Here are a couple of good examples from shabaz and from genebren
DMX Explained; DMX512 and RS-485 Protocol Detail for Lighting Applications
DMX diagnostic tool - Getting started
DMX diagnostic tool - Sending and Receiving Data
Hello Jon Clift,
Thank you for your response, I will keep you posted if I am successful.
Best regard
P.Congré
It probably ranks very well on a search engine as original content. You aren't simply rehashing content from elsewhere - you've written your own text, done your own illustrations, and the outgoing links are on-topic and relevant.
If I do a search on Bing for "DMX512", your blog comes up on the second page of results. That's a good result considering all the other quality material from manufacturers, standards bodies, and on-line reference sources that appears.
You might also give element14 a little of the credit as, beyond any SEO that they might be doing in the background, we're all also benefitting from being associated with a group of people who are producing quite technical material and that probably gives us all a few extra 'bonus points'.
I'm intrigued - I'm going to have a look at some of my old ones.
Hi Jon,
Interesting points, you're right, the search engine reputation of element14 links must be extremely high for technical posts. I was wondering, one other factor to add to the list might be if (say) the industries that work with it (e.g. lighting firms) don't tend to publish much interworking detail maybe. Surprising what combination of things worked there... partially it may even be that I used wording that newcomers to DMX512 many use and search for, because I was a newcomer to it too. I'm going to re-read that post, see if I can glean anything unusual that may have occurred.
Hello Jon,
I managed to control my LED strip with the USC512C4 IC with my arduino, but I need to do it with my STM32L4 but I can't find anywhere how to do it.
Do you have a code example for an STM32L4?
Best regard.
P.Congré
Sorry, I don't have any code I can give you.
Can't you port what you're doing with the Arduino to the STM32L4? It shouldn't be too difficult to send serial characters, so the tricky bit will be the break as that depends very much on what the particular serial peripheral can do. It might allow you to do it directly. Or you might be able to see a way to do it indirectly (by, for instance, enabling and disabling the peripheral so that it moves back to being an IO pin for a time, or by flipping the sense of the output pin if it can be changed from positive true to negative true). If you can't see a way to do it in the processor, you could always add an external logic gate to switch between serial and the break state. You'll probably need to use a timer to get the break period, so you'll have to work out how to do that too (I'm sure there's plenty of material on how to do that kind of thing).
Hello Jon,
There is no communication between the arduino and the STM32L4, and i can't port yhe arduino code to the stm32.
With the arduino, I managed to control my LED strip with DMX protocol (the LED strip has a USC512C4 IC).
Now I want to control the LED strip with my STM32L4 but it is quite difficult.
I use an RS-485 to create the DMX communication. I found some codes on the internet but it doesn't work.
https://github.com/aleksandrgilfanov/stm32f4-dmx-transmitter/blob/master/Src/main.c
https://github.com/carl3721/stm32-dmx512/blob/master/dmx-p103/src/main.c
Best regard.
P.Congré
The project at the first link you give appears to be based on some modified ST code. Perhaps you could ask ST for the original code if you can't find it on their website. It's very unlikely they would issue anything that didn't work.
Is there a reason why you can't just use the Arduino, since you have that working?