Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #30 on: January 08, 2013, 04:02:14 pm » |
Two clock cycles is well within the precision possible on an arduino or PIC No it is not. Write the code and see. Yes you can output something in 1 clock cycle, then you have to fetch the next byte, check if you have outputted all the data and loop back if not all in the next clock cycle? Yes Mike is Grumpy and he should ease up a bit. 2 clock long pulses are easy doable on an AVR. As long as you have time outside the pulse to make you decisions. In this case you have 20 clock cycles before your next decision. Check out http://www.instructables.com/id/My-response-to-the-WS2811-with-an-AVR-thing/for a bit banging routine on an AVR that leaves about 1/5 of your overall clocks free for doing what ever else you want too. What is it with the youth today thinking the solution to every problem is a 32bit CPU running at 80Mhz. Back in my day we had 8bits, 4Mhz and we where happy.
|
|
|
|
|
Logged
|
|
|
|
|
Samplefinger
Offline
God Member
Karma: 8
Posts: 819
ALWAYS ASK FOR THREE. One to use. One to lose. One to abuse.
|
 |
« Reply #31 on: January 08, 2013, 10:24:04 pm » |
What is it with the youth today thinking the solution to every problem is a 32bit CPU running at 80Mhz. Back in my day we had 8bits, 4Mhz and we where happy.
I had that too and I remember the painful waiting for the next greatest thing, which was only marginally better. And the software these days is STILL only marginally better though the hardware is pretty freaking amazing.
|
|
|
|
|
Logged
|
Latest Sampling Scores: ATXMEGA64A3U-MH x3, ATXMEGA256A3U-MH x3, SST38VF6404-90-5C-EKE x3, SST38VF6402-90-5C-EKE x3, PGA870 x3, THS770006 x3
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #32 on: January 09, 2013, 05:28:22 pm » |
I blame library dependence. If there isn't already a library for doing it it can't be done. I was given a challenge to see if I could read data from an SD card and stream it out a string of LEDs in ASM. Thats certainly a stretch goal over "two clock cycles isn't enough" 
|
|
|
|
|
Logged
|
|
|
|
|
US
Offline
Newbie
Karma: 1
Posts: 17
Hi! I wrote and maintain the FastSPI_LED library. Working on trying to keep it up to date.
|
 |
« Reply #33 on: February 03, 2013, 11:32:52 pm » |
I'm currently testing a full rewrite of the FastSPI_LED library that uses exactly 20 clocks per bit for the ws2811 library (as well as opening the code up to better porting to other platforms and hopefully speeding up the development/addition of new chipset support to the library and making the library far far smaller, nearly an order of magnitude smaller, than the currently published library - in theory, I should be able to support new clockless chips by just specifying the spacing of timings).
|
|
|
|
|
Logged
|
|
|
|
|
Samplefinger
Offline
God Member
Karma: 8
Posts: 819
ALWAYS ASK FOR THREE. One to use. One to lose. One to abuse.
|
 |
« Reply #34 on: February 04, 2013, 12:31:46 pm » |
I'm currently testing a full rewrite of the FastSPI_LED library that uses exactly 20 clocks per bit for the ws2811 library (as well as opening the code up to better porting to other platforms and hopefully speeding up the development/addition of new chipset support to the library and making the library far far smaller, nearly an order of magnitude smaller, than the currently published library - in theory, I should be able to support new clockless chips by just specifying the spacing of timings).
What are new clockless chips? An asynchronous processor? How does that work? Who provides that product?
|
|
|
|
|
Logged
|
Latest Sampling Scores: ATXMEGA64A3U-MH x3, ATXMEGA256A3U-MH x3, SST38VF6404-90-5C-EKE x3, SST38VF6402-90-5C-EKE x3, PGA870 x3, THS770006 x3
|
|
|
|
US
Offline
Newbie
Karma: 1
Posts: 17
Hi! I wrote and maintain the FastSPI_LED library. Working on trying to keep it up to date.
|
 |
« Reply #35 on: February 04, 2013, 02:37:44 pm » |
I'm currently testing a full rewrite of the FastSPI_LED library that uses exactly 20 clocks per bit for the ws2811 library (as well as opening the code up to better porting to other platforms and hopefully speeding up the development/addition of new chipset support to the library and making the library far far smaller, nearly an order of magnitude smaller, than the currently published library - in theory, I should be able to support new clockless chips by just specifying the spacing of timings).
What are new clockless chips? An asynchronous processor? How does that work? Who provides that product? I don't know - they haven't been released yet I'm referring to chips in the family of the TM1809, the UCS1903, and the WS2811. These chips only have a data line, no clock line. Instead the signal is something like the line held high for 340ns, then low 680 for a 1 and high for 680ns then low for 340ns for a 0, etc... Each of the chipsets out there has slightly different timings. For the new version of the library, I will be able to support new variations on these chips by simply specifying the hi/lo timings for 0 and 1 and it will figure out everything it needs timing wise from that 
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2246
|
 |
« Reply #36 on: February 04, 2013, 03:41:48 pm » |
As stated several times a higher MHz processor may do the trick. Running at 80MHz a Uono32 could work and is likely less expensive than tossing the LED strips:
I've driven 120-LED WS2811 strings using a Tiny85 running on the internal 8MHz clock. No problem.
|
|
|
|
|
Logged
|
|
|
|
|
Samplefinger
Offline
God Member
Karma: 8
Posts: 819
ALWAYS ASK FOR THREE. One to use. One to lose. One to abuse.
|
 |
« Reply #37 on: February 07, 2013, 01:53:35 pm » |
I don't think you can do it. If you look at the timing you have to be accurate to 100nS and there simply isn't enough time in a 16MHz processor to do that, it turns out to be about two clock cycles. Even in machine code the overhead of reading data and producing those two diffrent waveforms times is too tight. I think you will have to have a diffrent processor, one that runs faster. Or a very fancy piece of hardware.
Why not have the Arduino write it into a RAM and then use a discrete circuit with a trigger and a precision timer to read the RAM when triggered and bitbang it out all purely using hardware? The biggest, bestest serial to parallel shift register evah. Sure, this is nasty overkill but at least it will prove you can make a nice little bespoke circuit.  I am going to quote myself above. No one commented on this idea. Is it a stupid idea? I do stupid stuff like this all the time just to see if I can get it right. You can throw the discrete idea away and use something like a Xilinx XC9572XL in a PLCC with 5-volt compliant IO pins which is super hobbiest friendly and learn something. And with the right crystal and maybe a scaler in the CPLD I bet you can get it 1% complant with whatever timing the WS2811 requires.
|
|
|
|
|
Logged
|
Latest Sampling Scores: ATXMEGA64A3U-MH x3, ATXMEGA256A3U-MH x3, SST38VF6404-90-5C-EKE x3, SST38VF6402-90-5C-EKE x3, PGA870 x3, THS770006 x3
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2246
|
 |
« Reply #38 on: February 07, 2013, 02:21:24 pm » |
I am going to quote myself above. No one commented on this idea. Is it a stupid idea?
Yes, but don't let that stop you...  Arduinos are perfectly capable of driving a WS2811 without this. The timing for each bit is tight, yes, but between each bit you get 50us of breathing space - enough time to do just about anything you want.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #39 on: March 16, 2013, 09:40:19 am » |
Just relating my experience:
- Arduino Uno - Aliexpress WS2811 5050 SMD LED strip - FastSPI_LED2 library (preview build from March 2013)
I have a 130 LED strip being driven by the Arduino Uno. I had to adjust the timing in FastSPI_LED2.h for WS2811Controller800Mhz for the Aliexpress (Chinly brand) LEDs to 350, 800, 600.
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2246
|
 |
« Reply #40 on: March 16, 2013, 03:09:29 pm » |
I'm just writing code to drive a WS2811 string and playback sampled sounds on an ATtiny85 @ 8Mhz.
|
|
|
|
|
Logged
|
|
|
|
|
|