OctoWS2811 8-channels to 16

Status
Not open for further replies.

kadamr

Member
I have 16 rows of WS2812b LEDs I'm programming using a T3.1 and OctoWS library. I know I can connect two rows together to make the 8 channels the library uses but I was curious whether the code could be adapted to use 16 pins instead of 8 - then I could have 1 pin per row.

How feasible or easy would this be to do?

Thanks!
 
Is there a reason why there are 8 channels - moving a byte or something similar? So it's not a case of defining some more output pins?
 
Is there a reason why there are 8 channels

Yes, there is.

- moving a byte or something similar?

Yup, that's the reason.

The DMA controller moves bytes from RAM to the GPIO registers, causing 8 pins to change at once.

In theory, the DMA controller could be configured to move 16 or 32 bits at a time. But there aren't any GPIO ports on Teensy 3.1 with 16 bits. There is a native GPIO port with 12 bits, so it's possible (at least in theory) that 16 bit words could be used, with 12 of the 16 bits actually affecting I/O pins and the other 4 unused.

OctoWS2811 is open source and the Freescale chip is well documented, so go ahead and help yourself. I can't personally get involved in this.
 
That makes sense, and in which case, I will use two rows per pin.

Thanks for the info.
 
Last edited:
Two more questions:

Is there a reason why you've chosen the pins you have for the 8 channels? Could the pins be changed to 5 through to 12 instead, for example?

And is a 74HC245 (not HCT) okay to use for the level shifting?
 
The pins choosen are all on one port on the MCU. Port D. Which the DMA writes to in a one byte operation.
 
Hi, thanks for your reply. So presumably there is no neater configuration of pins that could be used instead?

It doesn't matter too much, I'm just about to finalise my designs on some stripboard. I want to make the smallest and neatest design possible. Consecutive pins on one or the other side of the Teensy would be better but perhaps that is not an option? I'm not being critical of the current library by any means - just for my application it is a little awkward to wire as it is now. I'm afraid I don't know how to find this out for myself!
 
Status
Not open for further replies.
Back
Top