WS2812 Communication
Posted: Mon Oct 07, 2013 1:07 pm
Has anyone tried controlling a WS2812 RGB led driver from a PIC using flowcode V4?
Datasheet is here http://www.adafruit.com/datasheets/WS2812.pdf
It uses a single data input line that has it's own specifically timed data format (different length of pulse for 1 and 0, at a rate of 800khz with a delay between each group of bytes).
I assume the best way to control it is using bit banging and have had a look at the spi_byte flowcide macro but couldn't work out how to make it run at a precise rate. Would I be best to use an interrupt?
Can anyone suggest the best way to go?
Thanks
James
Datasheet is here http://www.adafruit.com/datasheets/WS2812.pdf
It uses a single data input line that has it's own specifically timed data format (different length of pulse for 1 and 0, at a rate of 800khz with a delay between each group of bytes).
I assume the best way to control it is using bit banging and have had a look at the spi_byte flowcide macro but couldn't work out how to make it run at a precise rate. Would I be best to use an interrupt?
Can anyone suggest the best way to go?
Thanks
James