alternative to a d flipflop

Thread Starter

vitroblue

Joined Nov 19, 2010
3
hi

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

MCUPIN8 and MCUPIN7

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?

thanks
 

Ron H

Joined Apr 14, 2005
7,063
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.
 

ErnieM

Joined Apr 24, 2011
8,377
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.
 

Ron H

Joined Apr 14, 2005
7,063
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.
I think I misunderstood your question. Apparently you need complementary outputs. In that case, what Ernie said.
 
Top