Quick noob question on logic gate and external voltage

Started by rockhorst, April 24, 2019, 05:48:12 PM

Previous topic - Next topic

rockhorst

I came across a circuit with a D flip flop. The circuit itself is not so important, but I was wondering the following. Say the output Q of the flip flop is connected to the reset of another flip flop so the state of Q can reset the flip flop. Say there also is a switch that connects a voltage source (a logic 1) to that same reset pin. So the reset can be triggered by Q or by a switch, that's the idea. If Q sits a 0 and the switch is closed, Q is also connected to a 1. Is this ok, or will it damage the flip flop IC (which wants Q to sit at 0 but sees a 1 from the voltage source)? Sorry for the obvious noobness ;)
Nucleon FX - PCBs at the core of tone

PRR

The right answer is to put the two resets to a 2-input OR gate, and let that drive the flop's pin. Simple logic.

But there is also "MML", Mickey Mouse Logic, where you do just-enough engineering so nothing smokes and it does a right thing. This is VERY implementation-specific. Better draw us a better picture.
  • SUPPORTER

rockhorst

#2
Hi Paul, sorry if I was too vague but I think your post suggests a very easy solutions. I'll see if a 'faux' OR-gate with one or two diodes would do the trick. Probably protects the logic output of the chip while the signal is still sufficiently high to trigger the reset. Mickey Mouse, sure...it was more out of curiousity, what would happen if.

Edit: originally typed NOT-gate, meant OR-gate. Fixed
Nucleon FX - PCBs at the core of tone

Slowpoke101

As PRR indicated, what you need is an OR gate. But an OR gate can be implemented with only two diodes (1N4148 ) and a resistor (about 1 to 3K - select on test ).



This link may be useful;
http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/diodgate.html#c2

Most basic gates can be constructed using a few diodes, resistors and transistors (if an inverted output is required ).
  • SUPPORTER
..

PRR

> Most basic gates can be constructed using a few diodes, resistors and....

You can't build a computer (hundreds of levels of logic) with just diodes. You lose signal at each step. Diode alone has good pull-up and slow pull-down (or vice versa). Good logic has a booster in nearly every level.

But of course *one* level of logic between strong source and sensitive destination is trivially diode-ed.
  • SUPPORTER

rockhorst

Thanks both. It's just two flip flops resetting each other, so we're far from even an 8086 computer PRR :)
Nucleon FX - PCBs at the core of tone