cpldcpu / light_ws2812

Light weight library to control WS2811/WS2812 based LEDS and LED Strings for 8-Bit AVR microcontrollers.
GNU General Public License v3.0
960 stars 207 forks source link

ARM Cortex M0 LPC11UXX support #10

Closed benkuper closed 10 years ago

benkuper commented 10 years ago

Hi, great work on the lib ! i've been trying to use it on my LPC11U37FBD48-401 (Cortex M0 from NXP). I had to modify some syntax for the LPC_GPIO->SET[#port] in order to compile. I'm no expert but i believe the clock speed is 50Mhz (i tried with 50,48,36,32,24). When i update my led Array [GRBGRBGRBGRBGRB....] it's all flickering and showing only red, sometimes a small amount of green and never blue. The behaviors are pretty much the same with small differences when i change the clock speed.

Do you know what could be wrong and if i should continue trying to make this lib working with my CPU or if i should search for another one ?

Thanks Ben

cpldcpu commented 10 years ago

Hi!

The library should work, but you have to make sure you configure the clock and flash timing correctly.

benkuper commented 10 years ago

I'm sorry to ask for that, but i'm novice in CPU developpement : i'm using ColinkEx debugger and CoIDE, i didn't find where i can set these waitstates to zero and couldn't find the information on internet. I don't know either how to change the CPU clock if needed...

Thank you ! Ben

cpldcpu commented 10 years ago

You change that by writing to the configuration registers of the microcontroller in you code, not in the GUI. You should consult the manual for the controller.