03-22-2013 01:23 AM
Dear All...
I having a bit of headache with this circuit of mine.
If I understand it well.. the flip flop I am using i based on NOR Gates because the Set and Reset are active High.
When R = 1, U4 should light up.
When S = 1, U3 should light up.
But in my case, both Indicators are lighting up irrespective of the position of the switch.
Please follow the diagrams below for more details.
PLEASE HELP ME 😞
Solved! Go to Solution.
03-22-2013 05:54 AM
Try placing a resistor to ground at each input to the flip flop. In real circuits this can provide a path for leakage currents. I have no idea what the internal circuit of the FF model looks like.
Lynn
03-22-2013 06:08 AM
Yessssssss.. It's working... 🙂
But still I couldn't figure out how can there be leakage currents 😮
03-22-2013 06:24 AM
In the simulation the problem is probably not leakage currents. More likely the input voltage on the open input is not well defined. One model of a flip flop I looked at used NAND gates but had no connections to the input nodes. The outputs were connected to a controlled voltage source, a series resistor, and a capacitor to ground.
Lynn
.SUBCKT FFLOP 1 2 11 12 5 6
* CLK D R S QBAR Q
X1 7 4 2 8 NAND3_0
X2 8 3 10 9 NAND3_0
X3 1 8 10 7 NAND3_1
X4 4 9 1 10 NAND3_0
X5 4 7 6 5 NAND3_1
X6 5 10 3 6 NAND3_0
* Alternate Startup initialization
*X1 7 4 2 8 NAND3_0
*X2 8 3 10 9 NAND3_1
*X3 1 8 10 7 NAND3_0
*X4 4 9 1 10 NAND3_1
*X5 4 7 6 5 NAND3_0
*X6 5 10 3 6 NAND3_1
X7 11 4 INV_1
X8 12 3 INV_1
.ENDS
*$
.SUBCKT NAND3_0 1 2 3 4
E1 5 0 VALUE = { IF ( (V(1)>800mV) & (V(2)>800mV) & (V(3)>800mV), 0, 5 ) }
R1 5 4 400
C1 4 0 20P IC=0
.ENDS NAND3_0
*$
.SUBCKT NAND3_1 1 2 3 4
E1 5 0 VALUE = { IF ( (V(1)>800mV) & (V(2)>800mV) & (V(3)>800mV), 0, 5 ) }
R1 5 4 400
C1 4 0 20P IC=5
.ENDS NAND3_1
*$
.SUBCKT INV_1 1 2
E1 3 0 VALUE = { IF ( V(1)>800mV, 0, 5 ) }
R1 3 2 100
C1 2 0 10P IC=5
.ENDS
03-22-2013 07:23 AM
Which program do you utilise for your simulation?
03-22-2013 08:01 AM
I use MacSpice, which is a fairly straightforward port of Berkeley Spice 3f5.
Lynn
03-22-2013 11:27 AM
Is it better and easier than MultiSim?
If so, can you please tell me from where can I download it?
03-22-2013 01:17 PM
Not having used Multisim, I cannot compare ease of use.
MacSpice is a Macintosh only program. It is available here. It has a command line interface, so it is not the easiest program to use. The User Guide on their website is quite good at describing the elements of a circuit and how to run the program. There are also links to models.
The program is only a simulator. It does not do schematic capture or even list editing.
Lynn