I don't see the need to have a dedicated driver written in C. Here is working MicroPython code to drive these LEDs: http://forum.micropython.org/viewtopic.php?f=2&t=149fma wrote:Nobody with STM32 C programming skills to write a dedicated driver for these leds?
How fast can an output pin be toggled?
- Markus Gritsch
- Posts: 41
- Joined: Fri May 16, 2014 9:04 pm
Re: How fast can an output pin be toggled?
Re: How fast can an output pin be toggled?
Very nice work! But you only drive 1 led, what if using a 600 leds strip? You will use all ressources sending datas to the leds...Markus Gritsch wrote:I don't see the need to have a dedicated driver written in C. Here is working MicroPython code to drive these LEDs: http://forum.micropython.org/viewtopic.php?f=2&t=149fma wrote:Nobody with STM32 C programming skills to write a dedicated driver for these leds?
Frédéric
- Markus Gritsch
- Posts: 41
- Joined: Fri May 16, 2014 9:04 pm
Re: How fast can an output pin be toggled?
And how would driver code in C help you? You still would have to prepare the LED color data in some buffer using Python, which will become the time critical part. Sending the buffer with some dedicated C driver or handing it to the SPI send function is not that different.fma wrote:Very nice work! But you only drive 1 led, what if using a 600 leds strip? You will use all ressources sending datas to the leds...
Re: How fast can an output pin be toggled?
There was a discussion about using DMA... Ok, maybe a DMA() object could be enough, working with the SPI() object. But I guess using pure C could optimize things.
Anyway, I'll give a try to your solution, as I was looking for a nice demo to present micropython to local AFPY members. This is a cool one
Anyway, I'll give a try to your solution, as I was looking for a nice demo to present micropython to local AFPY members. This is a cool one
Frédéric
- Markus Gritsch
- Posts: 41
- Joined: Fri May 16, 2014 9:04 pm
Re: How fast can an output pin be toggled?
If your intention is to drive lots and lots of WS2812 LEDs and not just display some rainbow pattern, there are other, more suitable means, e.g. http://spritesmods.com/?art=imx233-ws2811 or https://www.pjrc.com/teensy/td_libs_OctoWS2811.html
Driving just some tens of them is easily possible using pure Python.
Driving just some tens of them is easily possible using pure Python.