Striplight Bit Bang Issue WS2811

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

   

I am trying to port the simple WS2812 code found here:

   

http://wp.josh.com/2014/05/13/ws2812-neopixels-are-not-so-finicky-once-you-get-to-know-them/

   

I am trying this so I can easily modify it for use with the SK6812 driver:

   

http://www.szledcolor.com/download/SK6812RGBW.pdf

   

I am trying to test it using an LED with a WS2811 driver:

   

https://www.adafruit.com/datasheets/WS2811.pdf

   

 

   

See my attached code, I cannot get the light to do anything.

   

Any help is greatly appreciated.

   

Regards,

   

Tom

0 Likes
7 Replies
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Tdvdesign: Here is some PSoC library code for the WS2811/12. Should make your life easier you won't need to modify some Arduino code.

0 Likes
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

   

I have used that library extensively, it is very well done indeed.  I was trying the bit-banging method so that I could learn some more about the communication and experiment with similar chips that are not supported by the library (AP102, SK6812).  I think my problem is timing, but I am not sure exactly how to get it right.  Based on the link below, I have changed my GPIO toggle to use a quicker method:

   

http://www.cypress.com/file/45381/download

   

I can now turn on the lights entirely, but not set colors.  The number of lights that I am trying to turn on come on at once and do not turn off.

   

How can I compensate for the timing of the on/off in the SK6812 in the datasheet vs the actual instruction time?

   

Regards,
Tom

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Tdvdesign So you are using data registers to increase speed?  You can get up to 4 times faster switching using data registers. Maybe a your own UDB or library device  would be better to get the speed you may need. Have you scoped the pin to see what the signal looks like? I don't have any Ws2811 or Ws 2812 devices to try your program on.

0 Likes
Anonymous
Not applicable

Hello everyone,

   

 

   

I'm trying to use neopixels with a PRoc module (no UDBs), but it seems every exemple  I find are based on PSoc modules.

   

Do you know if there is any exemple to drive neopixels over SPI, ,PWM/ISR or anything else?

   

 

   

Thanks for your help !

0 Likes
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

I would switch to the APA102 or equivalent if I were you, I can get you started with some code if you like.  It is very simple to drive over an SPI bus.

   

Regards,
Tom

0 Likes
Anonymous
Not applicable

tdvdesign, I'm considering a similar thing, controlling an APA102 strip without using up UDB resources.  Do you have a bitbang or spi sample?

   

Johann

0 Likes
MaHi_2791116
Level 1
Level 1

HI all, I'm trying to do the same thing. The processor I have CY8C4125AZI-S423 doesn't support the components from funwithleds and I need to use this processor. did anyone succeed with the bit banging? I want to be able to turn the leds on and change colours

0 Likes