Slowing Down RGB PWM Routine


Results 1 to 6 of 6

Threaded View

  1. #4
    egberttheone's Avatar
    egberttheone Guest


    Did you find this post helpful? Yes | No

    Default

    That is not so hard let me help ya;

    Code:
     
    
    main:
    
    for rainbowval = 0 to 255
    
    for a = 1 to 100
    gosub rbgrainbow 
    next a
    next rainbowval
    for rainbowval= 255 to 0 step - 1
    for a = 1 to 100
    gosub rbgrainbow 
    next a
    next rainbowval
    
    goto main
    of course you have to adjust the value's and you have to create the variable "A" (if your gone use high value's create a word size variable)

    Edit: you could also let a timer run in the background that keeps sending the pwm signals and change the value's in the mainloop
    Last edited by egberttheone; - 4th March 2005 at 21:35.

Similar Threads

  1. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  2. PWM setting PIC16F887
    By Gevo in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th June 2008, 07:24
  3. RGB Fading Using 3 LEDs and PWM
    By Tissy in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 20th February 2007, 15:53
  4. RGB Fading Using 3 LEDs and PWM
    By _abello in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 19th April 2006, 15:50
  5. Tidying Up PWM Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st February 2005, 00:26

Members who have read this thread : 0

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