lpcware

Thoughts on bit timing options

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by brik2k on Tue Dec 25 22:13:10 MST 2012
Hi,
I'm attempting to use an LPC11C24 to control a type of RGB led that has a simple controller (ws2811) built in to the led. Instead of using a clock signal the chip uses precise bit timing to recognize each incoming bit (24bits total to make 3 bytes). It varies depending on the datasheet you find but the basic idea is that a zero is sent as 250ns high followed by 1000ns low and a one is sent as 1000ns high followed by 250ns low. Essentially, the mcu needs to translate the 3 bytes in to the proper timing and then update a data pin every 250ns.

My question is, what sort of recommendations do you guys have for implementing this on an LPC11xx? Is it even realistically possible with just C code? I've already tried a timer interrupt but that appears to be too slow. I'm also working on using SPI, which works on other controllers, but seems to be a problem on the LPC because framing. Next on the list would be a tight loop that checks the timer. Ideas?

Thanks!

Outcomes