Need to drive 4 rgb leds, but have only 1 pin available...


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: Need to drive 4 rgb leds, but have only 1 pin available...

    OK, I try to decreasing the clock frequency, and the minimum clock is 16MHz and the WS2812 works fine.
    In my case at 8MHz the WS2812 not work.

    Pulse generator code for 16MHz looks like this:
    Code:
    ;------------ Pulse generator ---------------
    NeoBit:
        IF DataBit = 1 THEN
            ;generate 800ns pulse 
            NeoPin = 1
            ASM
                nop
            ENDASM
            NeoPin = 0
        ELSE
            ;generate 400ns pulse 
            NeoPin = 1
            ASM
            ENDASM
            NeoPin = 0
        ENDIF
    RETURN

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,129


    Did you find this post helpful? Yes | No

    Default Re: Need to drive 4 rgb leds, but have only 1 pin available...

    With the APA101 clock frequency is not an issue. We did some experiments in this thread:

    http://www.picbasic.co.uk/forum/show...ghlight=apa101

    Ioannis

Similar Threads

  1. Re: RGB Fading Using 3 LEDs and PWM
    By Fernandoangel in forum Off Topic
    Replies: 0
    Last Post: - 8th April 2012, 05:59
  2. Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?
    By jimseng in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th March 2012, 17:03
  3. TV remote controlled RGB LEDs
    By idtat in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd February 2009, 17:15
  4. RGB Fading Using 3 LEDs and PWM
    By Tissy in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 20th February 2007, 15:53
  5. RGB Fading Using 3 LEDs and PWM
    By _abello in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 19th April 2006, 15:50

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