How to controlling an SK6812 Addressable LED strip

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am wanting to program an addressable LED strip and was wanting to be pointed in the right direction. 

 

* This is NOT a finiished project so does not belong in the Projects forum. Until told otherwise I will assume you are using one of the ATMega microcontrollers and shift this thread to that forum. *

 

I am wanting to do this on C as a learning exercise but don't quite know where to start. I am using the SK6812 LED strip and are wanting to control round 18 rgb leds.

 

The data sheet doesn't state any kind of communication protocol just as I2C etc but I am unsure on how to code 24 bits onto a digital pin. I have tried looking at polou on github (https://github.com/pololu/pololu...) but it seems quite intense to understand. 

 

If anyone has done this before and would want to share how to turn on or control 1 led that would be helpful to begin.  

 

Thanks

Attachment(s): 

Last Edited: Tue. Mar 5, 2019 - 07:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seems the sk6812 is an improvement on the ws2812 leds by adding white.
The code is going to be tricky as the timing required is fast. Pololu use assembler code to get the speed as do most others. I doubt you’ll get it much simpler.

Here’s a discussion of the protocol:
https://www.google.com.au/amp/s/cpldcpu.wordpress.com/2014/01/14/light_ws2812-library-v2-0-part-i-understanding-the-ws2812/amp/

Last Edited: Tue. Mar 5, 2019 - 03:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

For project like this I always start by Googling for an existing arduino project, as just about everything has been done using arduino.

Yup, it's been done, so start there, even if you want to "do it yourself", use the arduino to test your h/w and connections first, then you can concentrate on writing your s/w knowing the h/w works!

 

Good luck.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Pololu use assembler code to get the speed as do most others.
HDL is an alternative (FPGA attached to the AVR)

NeoPixel Control - Xcelerator Block | Alorium Technology

 

https://github.com/Fabien-Chouteau/Ada-PicoRV32-example/blob/master/hardware/neopixel.v

via

Ada on RISC-V | AVR Freaks

...

Fabien added a NeoPixel controller; in-lieu of AVR assembly language, it's Verilog HDL with Ada code for the controller's register.

...

 

"Dare to be naïve." - Buckminster Fuller