Hi Guys,
Sorry bit of a lazy one, stuck in the airport (again) ... a customer threw a query at me regarding a potential project controlling a whole set of addressable LED strips...so had a quick look at a few infosheets. (They are certainly not fully tech datasheets!). The strips are programmed using a basic on wire technique which seems simple enough but I was wondering what is the best method in FC to achieve a reasonably accurate pulse timing.
[quote]Each high pulse encodes one bit: a short pulse (0.35 μs) represents a zero, while a long pulse (0.9 μs) represents a one. The time between consecutive rising edges should be 1.25 μs. After the bits are sent, the signal line should be held low for 50 μs to send a reset command, which makes the new color data take effect.[quote]
I understand the pulse timing does not have to be super accurate but the only timing I have done is using PC delays.. calling lots and lots of delays seems obviously crazy so I assume there is a much better way.
Does anyone have any ideas?
As ever, many thanks for any pointers. J.
Addressable LED Strip - One Wire Timing
Moderator: Benj
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: Addressable LED Strip - One Wire Timing
Just a though out of the stomach ,Most PIC's have a CCP/PWM module which has the ability to generate Pulse trains which would fit your requirement 100% the timing is then done by the module or as a secondJay Dee wrote:I understand the pulse timing does not have to be super accurate but the only timing I have done is using PC delays.. calling lots and lots of delays seems obviously crazy so I assume there is a much better way.
thought you can generate the pulse train by a Port Pin and a timer .
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Addressable LED Strip - One Wire Timing
Hello,
I've used these LED strips in a couple of projects, they are a bit fiddly to get the timings spot on enough to work but it is possible.
[/youtube]
The source code to drive the table can be found here: http://www.matrixtsl.com/mmforums/viewt ... 822#p57182
There is a version of the LEDs that has clock and data control signals which allows you to clock the data in rather then relying on the async timings. I would recommend these as they are considerably easier to get working in practise.
I've used these LED strips in a couple of projects, they are a bit fiddly to get the timings spot on enough to work but it is possible.
[/youtube]
The source code to drive the table can be found here: http://www.matrixtsl.com/mmforums/viewt ... 822#p57182
There is a version of the LEDs that has clock and data control signals which allows you to clock the data in rather then relying on the async timings. I would recommend these as they are considerably easier to get working in practise.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Jay Dee
- Posts: 398
- Joined: Tue Aug 18, 2009 6:42 pm
- Has thanked: 121 times
- Been thanked: 154 times
- Contact:
Re: Addressable LED Strip - One Wire Timing
Excellent, thanks guys. Nice to know if the project gets up speed I have some avenues to explore. I've pulled the example code and will have a look through on my return flight.
Cheers, J.
Cheers, J.