sequence recognizer

Discussion in 'Homework Help' started by miklee, May 10, 2011.

  1. miklee

    miklee Thread Starter New Member

    Joined:
    Mar 27, 2011
    Messages:
    8
    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.
    Thank you.

    Attached Files:

  2. miklee

    miklee Thread Starter New Member

    Joined:
    Mar 27, 2011
    Messages:
    8
    I remake the circuit using D FF (i change cause may the jkff downloaded from LTspice group don't works).

    Equations:
    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"

    Thank you

    Attached Files:

  3. Georacer

    Georacer Moderator Staff Member

    Joined:
    Nov 25, 2009
    Messages:
    4,913
    Location:
    Athens, Greece (GMT +2)
    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.
Similar Threads
Forum Title Date
Homework Help fsm sequence recognizer Jun 27, 2007
Homework Help sequence detector May 21, 2013
Homework Help 4-bit Binary sequence to 2 output Feb 20, 2013
Homework Help Sequence Detector Nov 17, 2012
Homework Help 4-bit sequence detector Feb 14, 2012

Related Site Pages

Section Title

Share This Page