Help wanted for logic or flip Flop!

Discussion in 'The Projects Forum' started by bytraper, Sep 19, 2012.

  1. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    126
    4
    I'm building a circuit and i'm having some problems toggling the PWM outputs between the 2 inputs!

    The diagram below is that I have and what I'm trying to achieve.

    Only 1 pwm will be active at any time, and I need the direction switch to toggle the pwm outputs between one or the other inputs.

    So for example if PWM A or B is on, and the direction switch is low, then the PWM signal goes to input A, but if the direction switch is high, then PWM goes to INPUT B.

    So basically, either PWM will be active at one time, and I need to toggle the outputs from input A to B depending on whether the toggle switch is an active high or active low.

    [​IMG]

    Has anybody got a solution to this? I was thinking a flip flop would work, but I cant get my head around the states.
     
  2. JDT

    Well-Known Member

    Feb 12, 2009
    658
    85
    You need an inverter like this:-
     
  3. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,999
    745
    Last edited: Sep 19, 2012
    bytraper likes this.
  4. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    126
    4
    JDT, that inverter only works if both PWM are active at the same time, but only 1 at a time will be active, not both.
     
    Last edited: Sep 19, 2012
  5. JDT

    Well-Known Member

    Feb 12, 2009
    658
    85
    Do you mean you want to swap the signals over? (Perhaps I don't understand)

    If so, see attached.
     
    bytraper likes this.
  6. bytraper

    Thread Starter Active Member

    Sep 28, 2010
    126
    4
    Jdt,
    that works, but it leaves the other input switched on when the direction is changed!
    For example, when PWM A is firing, and the direction switch is in one direction, output A might be pulsing but output B is an active high (only one of the outputs can be on at once), and when you switch the direction, output B is pulsing, but output A then goes to an active High.

    Dave, that switch looks interesting, I'll check that out!
     
    Last edited: Sep 19, 2012
Loading...