PWM and fade effect


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    May be you should add the PWM output, without any filtering it is totally "random" ( short way of saying it ...) as a signal ... so ...

    is it really the correct way to achieve a decent "linear" fading ... ???

    ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146


    Did you find this post helpful? Yes | No

    Talking

    47uf and a divider/zener?

    or is that not the spirit of the thread


    ___

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Use your own software PWM

    Hi,

    Darrel once made a multi output soft PWM routine which is interrupt based and works as intended from a PWM signal. Search the forum....
    I did a software PWM for a UPS but it is primarily in assembly.
    The concept is pretty simple.
    • On every tick increment a counter with it.
    • Match with your PWM value sets or resets the output.
    • Counter overflow, sets or resets the output.

    Would run in the background

    Or better though select a chip with hardware PWM.

    From the PBP manual
    f you want continuous PWM output and the PICmicro MCU has PWM hardware, HPWM may be used instead of PWM.

    Pin is made an output just prior to pulse generation and reverts to an input after generation stops. The PWM output on a pin looks like so much garbage, not a beautiful series of square waves. A filter of some sort is necessary to turn the signal into something useful. An RC circuit can be used as a simple D/A converter:
    It is better to handle the LEDs by current since the brightness (lux) is a function of the current through the chip. It is pretty easy to kill LUMILEDS with overvoltage causing current overshoots.

    Good Luck
    Regards

    Sougata

Similar Threads

  1. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 01:55
  2. 16f876a Pwm
    By Hainkm in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th December 2007, 18:33
  3. LED fade without PWM command
    By Nick in forum mel PIC BASIC
    Replies: 7
    Last Post: - 29th June 2005, 21:56
  4. Help with PWM and duty and integers
    By JDM160 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th March 2005, 07:03
  5. Fade out an LED using PWM?
    By RossW in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 6th August 2004, 20:59

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