Jump to content
Rickta59

[Energia Library] WS2811Driver LED Controller Class

Recommended Posts

Thanks! I bought them in assumption they we're WS2811's but as I'm comparing them with the 2812's they look more like these. I'm feeling kind of ashamed, I'm very sorry. Are there any Energia libraries available for the WS2812( b )? Could I possibly change the assembly of the WS2811 to fit the WS2812 timing? In fact I'd love to learn programming my MSP430 the non-energia way. As far as I looked that way of programming, you need to know the MSP430s architecture quite well. I have CCS on my laptop, so during one of my "exam-breaks" I can just load some of the code on my MSP430. Once again, realy sorry to make this error  :blush: .

EDIT

On this forum they're talking about timing differences of the different types of chips ...

https://forum.pjrc.com/threads/23877-WS2812B-compatible-with-OctoWS2811-library

Share this post


Link to post
Share on other sites

I calculated timings for the ws2812b and tried already to change the assembly to fit the ws2812b needs. The timings compared to the ws2811 are the following.

; --- High Speed Mode 800KHz
; WS2811
;        High / Low us   High / Low cycles @ 16 MHz
; Zero:  0.25 / 1.00        4 / 16
; One:   0.60 / 0.65        9 / 11
; Reset:    0 / 50+         0 / 800+
;
; WS2812b
;        High / Low us   High / Low cycles @ 16 MHz
; Zero:  0.4 /  0.85        6.4 / 13.6
; One:   0.8 /  0.45        12.8/ 7.2
; Reset:   0 / 50+          0   / 800+

I tried to change the assembly as I said before, I have little or no knowledge about assembly and just tried to reduce cycles at the low values and add some no-ops into the high value part. But I thing I'm not doing it right, mostly because of my limited asm knowledge. Is anybody willing to help me and take a look at the asm code. Maybe if somebody loves to help it's better to open a new thread with the code which's already there.

Share this post


Link to post
Share on other sites

Hello sorry for my late reply, I had some exams to finish  ^_^ , but today I allowed myself a small break. @@RobG I've runned the code you provided, and it wasn't doing what it should. Then I tried to rewrite the assembly function of @@Rickta59 to fit the timing, but  I kinda  failed, and since I'm not familiar with debugging such functions (I don't have an oscilloscope so I can't find what I've coded wrongly). So I started to insert some NOP's in the  existing  code (well thought off course ) and to my surprise, it started displaying my coded colors more frequently, but for one  or another reason it's still going wrong every 6 to 8 times. I made a small recording of it. I also uploaded code to bitbucket.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×