WS2811 and WS2812 One-Wire Communication Assembly Help


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    interesting find ioannis.

    the an seems to lack many details not just how to use it ,I tried it out on a pic16f1619 and discovered that the an description of the clc cells setup is quite misleading

    the reality is they are set like in these images


    I'm not sure I have this exactly correct but it looks to work

    i have included my working example it spits out data for 64 leds [192 bytes] in 2mS.

    I cant see much advantage to it over my earlier routine you only have a few uS between bytes barely enough time for a pbp style dt interrupt
    Attached Images Attached Images   
    Attached Files Attached Files
    Warning I'm not a teacher

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    a small refinement
    CLC1 can be released from use its not needed with a 16f1619

    by

    CLC2SEL1 = $0E; in lieu of 04
    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,146


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    Richard, thanks for looking into this.

    For 64 led's I think the timing for each frame is 3,84ms. Does it work with 2ms?

    Anyway, you did a great job on this. Really fast!

    Well, the AN implied, or at least I wanted to be that way, this solution would be fast enough for the MCU to do other tasks.

    But as you tested, yes, seems there is not enough time.

    I want to use this strips for a 60 led's (1m bar) for medical purposes and the timing is very strict.

    Thanks,
    Ioannis

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    I may have measured that wrong, its more like 5mS now for 192 bytes


    the spi takes 25uS per byte and there is a 5us gap between bytes as is

    I think the gap between bytes needs to be less than 50uS

    so an isr has 60us to get in do something and get out again

    conversely an asm isr could feed the spi buffer every 60uS or so
    Warning I'm not a teacher

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    just for a joke I upped the osc to 32mHz ,
    it still works , its less than 3mS now for 192 bytes
    these things aren't that fussy
    Warning I'm not a teacher

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    just remembered de morgan equivalents , have not done Boolean algebra since ttl was in vogue
    Warning I'm not a teacher

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,146


    Did you find this post helpful? Yes | No

    Default Re: WS2811 and WS2812 One-Wire Communication Assembly Help

    It seems that the chips WS2811 are quite tolerant on the timing specs.

    Ioannis

Similar Threads

  1. PIC to WS2812B / WS2811 IC
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 19th January 2018, 19:37
  2. ws2812 - pic12f1822
    By richard in forum Code Examples
    Replies: 0
    Last Post: - 12th January 2016, 09:52
  3. Assembly
    By Normnet in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 19th March 2007, 03:44
  4. How do you do this in Assembly
    By ice in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th May 2005, 06:47
  5. Assembly?
    By Dwayne in forum General
    Replies: 11
    Last Post: - 4th January 2004, 18:18

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts