Isolate PWM outputs of microcontroller

Discussion in 'The Projects Forum' started by deityness, Jan 4, 2013.

  1. deityness

    Thread Starter New Member

    Jan 4, 2013
    4
    0
    Hi everyone,

    I have a PICF322 that has 2 independent PWM output pins that i am using to control 2 LEDs. One LED i just change the brightness upon switching a button, while the other LED toggles among several settings from low to high brightness, and also on and off patterns.

    So my issue is that the two PWM signals seem to be interfering with each other coz the other LED which is supposed to be just on with a constant brightness is flickering acccording to the pattern of the other LED. It get's worse when i replace the patterned LED with a motor. The blinking in the other LED becomes more pronounced. I would like to resolve this issue right now, because the plan in the end is to use the two PWM outputs to control a motor.

    Thanks in advance for your inputs and suggestions! :)
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,964
    743
    Can you post a diagram, and part of the pwm asm file ?
     
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Do you have decoupling capacitors across your supply?

    Also, a schematic will help...
     
  4. KrisBlueNZ

    Member

    Oct 17, 2012
    111
    14
    It's probably your power supply voltage varying under load. Measure it with your second LED OFF and at maximum brightness. If this is the problem you can use a constant current source/sink instead of a current limiting resistor to set the LED current; that will eliminate the dependence on the power supply voltage as long as it doesn't drop too low.
     
Loading...