alternative to a d flipflop

Discussion in 'General Electronics Chat' started by vitroblue, May 15, 2013.

  1. vitroblue

    Thread Starter New Member

    Nov 19, 2010

    i'm making an experiment with a 8 bit MCU
    i need two signals to turn on or off a device

    A and B

    so i placed them in two pins, lets say


    but after fooling around with the logic i came to the conclusion that

    B = A'

    which remind me of the flip flop D truth table

    so i don't really need to waste two pins, one would do, but how can i generate the complement signal?

    at first i though a npn transistor could help. i'll take the collector as A and the emitter as B and solved... but that's just too easy. would that really work?

    i know the flip flop D does exactly what i want, but i'm asking this because i dont want to add a new part number to the bill of materials, but rather work with what i already have. besides, flip-flop d needs a clk, so i'd still be wasting two pins (at least). i could use that free pin in something else...

    should i rather stay with the two pins?

  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    If you want to apply A and A' to two MCU inputs, then you don't really need two pins and two signals. You can apply A to a single pin, and invert that internally with software.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Of course, since you already own a microcontroller, and you can't return individual pins, there's nothing wrong with just using the micro's pins.

    And since B = A' doesn't have any state information it's not a model of a flip flop.

    It is however a perfect model for a simple inverter.
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    I think I misunderstood your question. Apparently you need complementary outputs. In that case, what Ernie said.