# Exercises of sequential systems with JK

Exercise 1:  To design a system that activates the illumination of a great room from 4 different entrances. In order to extinguish, we will use the same pulsers.

We happen to the resolution.

1 Tenemos whenever some of pulsers p is pressed, the system change of state. The pulsers can be connected in parallel. They are connected so that when some activates, it enters 1 in the system. The diagram of Moore is: 2 Now we happened to the table of the truth.

 p Q Q (t+1) J K Exit 0 0 0 0 X 0 1 0 1 1 X 1 0 1 1 X 0 1 1 1 0 X 1 0

The entrances that we have are the p and exit Q of the bistable one in the previous state. In the first row we have p=0 and we are in Q, therefore the exit does not change. For that transition, entrances j and k can be J=0 and K=1, but also it can be J=K=0, since in that situation it does not change the exit. We reach the conclusion that J must be 0 but K can be 0 or 1, therefore we put an X. The rest of the rows is obtained with the same reasoning.

3 Table of karnaught. We see the entrances to obtain the function of J and of K. We constructed our tables by the system explained in etma previous and have J = K = 1.

4 Circuit we have put only a pulser Exercise 2. It designs a system that activates a lamp of intermittent way. The frequency of the intermitencia comes given by the frequency from the clock of the bistable JK.

Exercise 3. It designs a system that has two entrances (two players), so that:

it roasts ignites a light bulb To if pulser 1 pulser 2 is activated before

b ignites light bulb B if pulasdor 2 activates before

c In the rest of situations, no light bulb ignites.

Solution:

First of all, we make our diagram of Moore: We have 3 steady states, E1, E2 and E3. From E1 (the game begins) it is possible to be happened to E2 if player 1 beats before, or to E3 if player 2 beats before. If both they beat simultaneously or there is no answer, it remains in E1. Once it is arrived at states 2 and 3, he remains always until the re-setea presenter there the system.

We will see the table of the truth

 a b Q1 Q2 Q1 (t+1) Q2 (t+1) J1 K1 J2 K2 0 0 0 0 0 0 0 X 0 X 1 1 0 0 0 0 0 X 0 X 1 0 0 0 1 0 1 X 0 X X X 1 0 1 0 X 0 0 X 0 1 0 0 0 1 0 X 1 X X X 0 1 0 1 0 X X 0

The red rows indicate the passage to us from the E1 to E1, since the values that enter are 00 and 11 and, therefore, is change of no states. The values of J and K to happen from zero to zero are, j=0 and k = 1, but as we left from zero and we reached zero, if we entered the two entrances jk the 0, also we obtain an exit of Q (t+1) = 0 (to see table of JK =. Therefore, we have entered them of jk must be 0X.  We come from iguan form pora the rest of variables.

Therefore, we have K1 = K2 =0 and and The circuit is of the following way. Exercise 12: To design a circuit with bistable JK that controls the lights of a traffic light so that it has been the following sequence:

The green one ignites, soon goes to the yellow light, later to the red one, soon returns to amber to finish in the green one. The system becomes to repeat indefinitely.

In this exercise we have an entrance as X in which, be that as it may its value, the state changes of q1 q2, of q2 to q3, etc. We are going to need 4 steady states. Although it seems that with three it is sufficient (Q2 and Q4 have the same exit), the origin is different and therefore, forces to us to create 4 states.

For 4 steady states, we needed two bistable JK, that we will call JoKo and J1K1. Those bistable ones have some exits Qo and Q1 that take values 00, 01, 10 and 11.

For that reason we have the following table of the truth:

Before exposing it completely, we will see how one obtains each one of the values JK to happen of a state Q to a Q (t+1).

We start off of which we happened of a Q1 = 0 to a Q1 (t+1) = 1. In this case, we have 4 possibilities of J and K to be able to happen from the 0 to the 1 and must know as of them they are valid. We will make a small table to explain it:

 Q1 Q1 (t+1) J1 K1 Commentaries 0 1 0 0 This option is not worth because with JK = 00 stays the exit. As before he was 0, the following thing is 0, but we needed a 1. It is not worth 0 1 0 1 This is not worth either since a JK=01 puts the exit to 0 and a one is needed. 0 1 1 0 This IF it is worth since the combination jk=10 puts the exit to 1, that it is what is worth q1 (t+1) 0 1 1 1 This also is worth since the 11 causes that the exit is the inverse one of the value that was before, happens from the 0 to the 1

We draw the conclusion that the values of JK 10 and 11 are valid, or what is the same, JK - > 1X

The table of the complete truth is:

 Qo Q1 Qo (t+1) Q1 (t+1) Jo Ko J1 K1 Green Amber Red 0 0 0 1 0 X 1 X 0 1 0 0 1 1 0 1 X X 1 0 0 1 1 0 1 1 X 0 1 X 0 1 0 1 1 0 0 X 1 X 1 1 0 0

We will see as we must feed each J and K so that pass from a state another one. Soon we will see that exits we must take (of Q1 and Q2) to obtain the exits of the lamps of the traffic light.

Once we have the table of the truth, it is obtained that: In this case, we have considered X as 1. Now, we have if X is =0

For J1 and K1, we assigned fixed value to him 1

We have green it ignites when Qo (t+1) = 0 and Qo (t+1) = 0, Therefore: We go with pilot amber: One activates when Q1 (t+1) = 1, therefore, the function is: And for the red one, and it activates when Qo (t+1) = 1 and Qo (t+1) = 0, therefore, the function is: We have the following circuit I leave the connection you of logicly of the traffic light

I have been a video explaining just a little bit but this exercise:

Exercise 13:

To design a system that activates a light if (1110) receive an entrance and it is deactivated if it receives another entrance (1101). For the rest of the possible combinations, the system must remain as it were, that is to say, if the light were ignited, remains ignited vice versa and.

Resolution:

Our diagram of Moore would be: We construct the table of the truth, summarized since it only happens transition for a combination. We have:

 Entrances J K Q= Exit 1110 1 0 1 1101 0 1 0 Rest of Combinations 0 0 Q (T-1)

Directly we have: and Exit Q agrees with the logout

Our circuit stays as: We can lower the file in this connection. Jk with 4 entrances

Exercise 14

To design a system of opening of a safe, that with a key the key is 1 1 0 1, is due to open whenever the sequence is the correct one. For it we have a temporary system, so that once in a while the entrance of a pulser is read. The pulser To that it enters the data, enters a 1 logical one if a 0 is pressed and if it is not pressed.

First of all, we created our table of the truth based on a state diagram, that we showed next: In this diagram we have an entrance and an exit. Since there are 4 steps, we created 4 states and therefore, we needed 2 bistable JK.

We are going to complete the table of the truth starting off from q0 giving the return to arriving at q3.

 A q1 q2 Q1 Q2 J1 K1 J2 K2 S 0 0 0 0 0 0 X 0 x 0 1 0 0 0 1 0 x 1 x 0 0 0 1 0 0 0 x x 1 0 1 0 1 1 0 1 x x 1 0 0 1 0 1 1 x 0 1 x 0 1 1 0 0 0 x 1 0 x 0 0 1 1 0 0 x 1 x 1 0 1 1 1 0 0 x 1 x 1 1

Of the table we have with the help of karnaugh   K2 = 1

and the exit S = aq1q2

The circuit that we have left is: We mount our circuit that we can see in * sequential Alarm circuit

Extra activity. The system has a small vulnerability. It finds out what is and it applies some solution.

to *Tener in account that the clock that we have put in the circuit is of 2 seconds, that act by ascent flank. The reading that makes the system is what enters by the entrance to right that moment that raises the pulse. It is necessary to have it in account to make the simulation.

Activity 15.

In the problem of the previous subject that we treated a system to control the level of an elevated deposit, we found the problem of the limitation of the combinacional electronics for this kind of problem. To construct to a system using a JK that solves this disadvantage knowing that the water is taken from a well with sensor c (must be to 1 so that the pump works), and the high deposit has a level low b (sensorial b) and another one of filling a (sensorial superior a). If the water is between a and b is due to activate the pump in the filling process but not in the casting process. In this last case, one activates when it arrives at the minimum. With this we avoided the continuous starting of the pump.

Development:

We have a series of steps that are generated in the filling of the deposit and which they give rise to steady states, whose situation changes when it changes the water level and some sensor activates. We happen to describe them.

the well has water and the deposit is empty. This gives rise to the E1 state where the exit is 1 (motor working).

2 the water arrives at the minimum of the deposit (b activates). This gives rise to us to a new steady state E2

3 the water continues entering and it is arrived to the maximum. The sensor activates and we have the new steady state E3

4 the water descends, the motor does not have to work. It continues lowering until bequeathing to b (001) moment at which the system returns to the E2 state

We are going to set out this reasoning in the diagram of Moore.

In this diagram, we considered the entrances in the ABC order, therefore a value 001 would be a=b=0 and c =1. (full well, I deposit emptiness). it is necessary to consider that in the previous diagram we can have omitted some situation of entrance by very little probable (to see what). we are speaking of situations of the type to activated and b to zero, and things of the style.

With the previous diagram, we constructed our table of the truth of 3 entrances, an exit and two bistable ones. The E1 state we obtained it with Q1=0 and Q2 = 0, the E2 state with Q1 = 0 and Q2 = the 1 and E3 state with Q1 =1 and Q2 =0. The E4 is not necessary.

 a b c Q1 Q2 Q1 (t+1) Q2 (t+1) J1 K1 J2 K2 Exit X X 0 0 0 0 0 0 X 0 X 0 0 0 1 0 0 0 1 0 X 1 X 1 0 0 1 1 0 0 1 X 1 1 X 1 0 1 1 0 1 0 1 0 X X 0 1 X 1 X 1 0 1 0 X 0 0 X 0 1 1 1 0 1 1 0 1 X X 1 0

j1 = K2 = abcq1'q2

k1 = a'b'cq1q2 €²

j2 = A little while. You haven't thought that this can be done with less bistable?

We will see if it is possible to have only two possible states, motor worked and motor unemployed. We will see the transitions Now we have a bistable one, giving E1 as Q1 to 0 and E2 when Q2 = 1

The table is:

 a b c Q Q (t+1) J K 0 0 1 0 1 1 X 1 1 1 1 0 X 1 X X 0 X 0 X 1 rest Q 0 0  Exit = Q

We prove the circuit We can lower in Circuit to fill I deposit of water

Activities.

1 the previous circuit, we have a small error, that you must find out. I leave the simplified circuit you that eliminates that error. Control of I deposit improved

2 In the previous analysis, we have not used Karnaugh to simplify functions.  It uses that system to obtain a simplified function

3 In the previous circuit, can be simplified something if we worked with entrance CLR of the JK and sensor c. It finds out how it is possible to be done.

Activity 16. In a traffic light, we want to control the pedestrian crossing by means of a pulser P. If it is not pressed, the green light remains ignited indefinitely. If it is pressed, the yellow light ignites and the red one, spent a time remains ignited only the red one and to finalize, it becomes to put the green light.

To see resolute exercise. Traffic light pedestrians with JK