Go Down

Topic: Due with WS2811 LED Strip (Read 9 times) previous topic - next topic

mitocho

I'm trying to drive a ws2811 LED strip with my Arduino Due, but every library I've found so far is made for older arduinos(they use the AVR library suite, which is incompatible with ARM chips).  Can anyone help me out? 

Rudyv

Hi,

Have a look at  https://github.com/adafruit/Adafruit_NeoPixel this library works for WS2811.

KR,
Rudy

mitocho

Unfortunately, it doesn't work with an Arduino Due because it uses assembly in some parts of the code.

Paul Stoffregen

I ported Neopixel to Teensy 3.0.  That code can probably work on Due, perhaps with only slight modification?

If you're going to use a LOT of WS2811s, you really should look at OctoWS2811....

mitocho

Paul,

I took a look at your code, and I'd like to try to port it over to use on the Arduino Due, but I'm confused by some of the following statements:

Code: [Select]

GPIOD_PCOR = 0xFF;


Code: [Select]

// DMA channel #1 sets WS2811 high at the beginning of each cycle
DMA_TCD1_SADDR = &ones;
DMA_TCD1_SOFF = 0;
DMA_TCD1_ATTR = DMA_TCD_ATTR_SSIZE(0) | DMA_TCD_ATTR_DSIZE(0);
DMA_TCD1_NBYTES_MLNO = 1;
DMA_TCD1_SLAST = 0;
DMA_TCD1_DADDR = &GPIOD_PSOR;
DMA_TCD1_DOFF = 0;
DMA_TCD1_CITER_ELINKNO = bufsize;
DMA_TCD1_DLASTSGA = 0;
DMA_TCD1_CSR = DMA_TCD_CSR_DREQ;
DMA_TCD1_BITER_ELINKNO = bufsize;


Are these statements particular to the Teensy, or DMA?  I've never used DMA before, and I tried googling a few of the statements but didn't get anywhere.
Could you give me a pointer?

Thanks

Go Up