I've been looking at the timing to drive a WS2811 from a AVR processor, have not looked at PIC processors yet, and by it's self it's not a problem doing it in software. When you add in processing UART interrupts for the DMX input that's when things start getting tricky using software only. Doing this using a Propeller is easy since you have multiple cores and you can split the DMX and WS2811 into different cores. Using a WS2801 is easy since there is a clock line and it will handle a longer time delay while in the DMX interrupt routine. Doing the WS2811 with a single core processor you running into some really tight timing issues doing it software only.
So has anyone looked into this closely and found a way to pull it off?
well might be close to what your looking for but only 6803 and 2801
http://doityourselfchristmas.com/forums/showthread.php?15286-DMX-to-WS2801-Pixel-Bridge&highlight=rpm+ws2801
The J1SYS pixel controllers run multiple outputs of 2811 with no problems. They do use a much more powerful PIC than people seem to like using here though.
David_AVD wrote:The J1SYS pixel controllers run multiple outputs of 2811 with no problems. They do use a much more powerful PIC than people seem to like using here though.
Yes, there are other PICs than just the PIC16f688 that runs on the ren! With a PIC24 or 32, you've doing this without any trouble. There would be processor cycles to spare. I can output 16 strings worth with a PIC24.
You can still use the standard SPI, even though you are just sending DATA to the Pixel. You just need to think about how you'll preprocess the data so you can stick it into the SPI buffers 'ready' to send.
I was looking into using AVR stuff for some projects next year as well (so much so I got an STK-600) - I figured as long as there is an Arduino sketch for what you want you could simply use the code as-is or modify for your particular processor. I've seen quite a few DMX and/or pixel code projects for these around.
timon wrote:So has anyone looked into this closely and found a way to pull it off?
How many pixels and strings do you want to run?
I think this can be done with a PIC 18F2550 or equivalent (13 - 16 pixel strings in parallel, one string per I/O pin); there are enough instruction cycles. In fact, I think it can also be done with a 16F182x if you don't overlap the serial I/O with the pixel I/O, but memory constraints would limit it to fewer pixels or to specialized applications such as RGB snowfall tubes or other pre-defined patterns.
don
I assume you are aware of the FastSPI library for Arduinos.
http://code.google.com/p/fastspi/
For the 2811/1804 and similar self clocking pixels, he turns off interrupts to spurt out the data via bit banging tho. (He does use SPI for other chips. Using hardware SPI limits you to just one output pin on the ATMega 328 tho, while the bit banging code can use any pins).
If you fed the arduino (clone) via USB or WizNet ethernet rather than serial, there is some buffering which could save you. Otherwise you have to get clever.
Dunno about the Pics - obviously the higher end ones can do it because J1SYS and Mr Packethead do! ('course, they are clever folks too). It's not just about sheer mips throughput, it can be the latencies which kill you.
Zeph wrote:It's not just about sheer mips throughput, it can be the latencies which kill you.
This is why cooperative multi-tasking is actually more efficient that interrupt-driven code for lower-end processors.
don
You make a very good point there Don. As long as the tasks are serviced often enough, I can see where being deterministic can be much better.
I'm looking at using the counter timer to generate the the WS2811 bit timing which because it's double buffered should leave enough time to service the USART. To keep the speed up I may not use any interrupts, will see. I will say there will be a lot of instruction timing.
