Addressable RGB LED's & LED strips


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    I ebay'd a couple of 60 led/m strips as I am interested in making a "wearable" safety vest for when I am biking. I played with a trinket - which worked fine in its limited capacity - but I wanted more and didnt want to learn another language. I hooked up an oscilloscope and tried getting the code in to light up a single led but PBP and a 16F819 @ 20mHZ coding was not fast enough for the WS2811 timing requirements. I tried using an asm subroutine within PBP for writing to the WS2811's and voila - but no time left for calculations. So, I started reading, more reading, finally ran across a thread with this link to an ASM file which uses the SPI in a 16F767 for a single LED:

    http://wiki.hacdc.org/index.php?titl...asm&oldid=8964

    This guy (credits to David Kaufman) did a great job - I just adjusted config and pic# to my chip and was running in a couple minutes. Few minutes later I had the entire strand running. So I guess my plan is to try and go back to PBP and try to write my calculations out and then call his ASM subroutine for addressing to the led's. Thats the plan anyways - I am a horrible programmer - so if anyone else goes this route and wants to post some code so I can learn more efficient coding and tricks I would be most grateful!!

  2. #2
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    If you get something working please share it I had zero luck controlling these things.
    Shawn

  3. #3
    Join Date
    Aug 2010
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    This file is entirely in assembly (I'm not sure how to call assembly subroutines from PBP). The author taught how to light a single RGB, my progress to date is the start of a chaser so it will light 60 rgb's sequentially and do some color shifting (Still lots to learn here). Should load right up in MPLAB (v8.9 used) The changes you may need to make for it to run:

    your chip (must have SPI and 20Mhz)
    your chip config settings
    change nLED for your length of string (60)
    scroll down to delay subroutines to speed up, slow down ...

    The original author taught how to light a single LED. You will easily detect my coding as the extent of my assembly knowledge when I opened his program was nop!ColorStripTest_819.txt

  4. #4
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    Any one had any luck yet? I just picked up a 8x string and want to play with them. The SPI sounds like and interesting approach.
    Bo

  5. #5
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Cool Re: Addressable RGB LED's & LED strips

    WOW, Nobody has provided code for an LED strip yet !?!?!?!?

    Ok guys i will have working code for you before the weeks out. im thinking multi-color knight rider... sounds interesting. I will be using my trusty PIC16F877A Dev boards.

    Till then, happy coding !
    There are 10 kinds of people. Those that know binary and those that do not.

  6. #6
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    This technique is very interesting:
    Tutorial on Programming the NeoPixel (WS2812) RGB LEDs

    I'll test it with my oscilloscope someday...

  7. #7
    Join Date
    Mar 2005
    Location
    CROATIA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default Re: Addressable RGB LED's & LED strips

    Hi,
    actually I had idea to put few passive component for making one-shout for short period and one shut for longer period
    after that i timed mssp module to average carrier frequency (positive + negative periode) this can be done using add register i done it with 16f1827 + internal osc +PLL
    intention was to make it on both MSSP modules, but i have problem using both paralell.....
    ok, this is working, and now timing and hw-accelerated sending is piece of cake for basic timings.....
    but i miss memory, so i have to port all onto 46k22 which is still dual mssp internal 64mhz, cheap, need to read erratas frequently but almost always there is workaround
    why more memory ? because i want to have ability to change any led, so you need 3 byte per led, and for 100 leds, this is 300 byte of ram....

    this days i obtained psoc4 and i want to organize UDB module for hardware accelerator for sw led, but ah.... this is totally hardCore

    http://www.element14.com/community/b...ioneer-dev-kit
    noone for now is'n sharing code/project, so i can learn from working project.... there is actually other shared article as arduino or others...

    i hope i at least point you in some direction....
    reagards

Similar Threads

  1. RGB led driver ic lpd6803
    By m_flfl in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th July 2012, 20:35
  2. RGB led driver ic lpd6803
    By m_flfl in forum General
    Replies: 0
    Last Post: - 29th May 2012, 19:49
  3. Free LED lights and LED strips
    By mistrip in forum Adverts
    Replies: 0
    Last Post: - 18th May 2012, 04:44
  4. RGB LED driver, Any comments?
    By paxmowa in forum Schematics
    Replies: 31
    Last Post: - 7th March 2012, 21:52
  5. RGB LED Matrix
    By ERIK in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th June 2008, 07:01

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