I done a sequence recognizer for the string 1001 with FF JK
The equations are:
J1 = X' Q0
K1 = X + Q0
J0 = X + Q1
K0 = X'
Z = Q1 Q0 X
Now I have to simulate it with LTspice, but it doesn't work. The output of the FFs is always 0. Can you help me?
I simulated the circuit with an other logic simulator and it works, i don't know if I set some wrong value.
I remake the circuit using D FF (i change cause may the jkff downloaded from LTspice group don't works).
D1=Q1 Q0' X' + Q1' Q0 X'
D0=X + Q1 Q0'
Z=Q1 Q0 X
I set the source V2 for the sequence 1001 (1st clock high value, 2nd and 3rd low value and 4th clock hight again). But when I start the simulation I have an error: "Analysis: Time step too small; time = 0.00012, timestep = 1.25e-019: trouble with dflop-instence a2"
I ran your first circuit by hand and I disagree with something:
You have the state 00 as the Reset state.
With a '1' you go to 01 and you start reading the '1001' sequence.
A '0' drives you to 10.
Another 0 gets you to 11.
And then with the final '1' you go to 01, which should be your final state but it has been used before.
I understand that you tried to build a Mealy machine, but to be honest I don't trust them much in actual fast circuits. I would use a fifth state even though that would add another Flip Flop.
That said, your JK circuit works in theory as you would like to, but I don't know what problems your software might cause. Maybe you could make the input last a bit longer, in order to avoid gate delays and propagation of them.
For example, make a clock tick every 1ms and synchronize your input in the same period and make your '1's last at about half a ms.
.I am a prisoner of high standards and low social skills
I wish I was the best at what I would do, and what I would do wouldn't be pretty.
|Related Site Pages|
|Video Lecture||JK Flip-Flop - Digital|
|Worksheet||Simultaneous equations for circuit analysis|
|Worksheet||Series and parallel AC circuits|
|Textbook||Finite-state machines : Principles Of Digital Computing|
|Video Lecture||Counters - Digital|
|Textbook||Solving simultaneous equations : Algebra Reference|
|Textbook||Finite State Machines : Sequential Circuits Counters|
|Textbook||LED sequencer : Digital Integrated Circuits|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Help with a camera controlling sequence||joshzstuff||The Projects Forum||6||04-26-2011 11:26 PM|
|Led Sequence||Rabster||The Projects Forum||5||03-06-2011 12:49 AM|
|Need help to design a counter that follows a given sequence using D Flip Flops||dragstang86||Homework Help||8||11-18-2010 08:42 PM|
|Sequence Counter with D ffs||logicpro9999||Homework Help||3||04-03-2010 06:08 PM|
|fsm sequence recognizer||xmadmaxx||Homework Help||3||06-28-2007 08:19 AM|