Designing a Synchronous Controller with JK Flip Flops for Object Detection

In summary, a JK flip flop is a digital logic circuit that stores and manipulates binary data using feedback mechanism. It has two inputs, J and K, and two outputs, Q and Q'. It works by changing the output based on the current state and inputs when a clock pulse is applied. Some applications of a JK flip flop include data storage, pulse counting, and sequential logic circuits. It differs from a D flip flop in that it has a reset input and can change on both the rising and falling edges of the clock pulse. To design a JK flip flop, you need to determine the requirements, use a logic gate diagram or truth table, and consider factors such as propagation delay and setup/hold time.
  • #1
dnguyen5
1
0

Homework Statement



I'm having difficulty with this problem.

using a synchronous controller with jk flip flops, a device is to turn whenever it hits an object. on the front of the device, there is a sensor whose output is "1" whenever it hits an object and "0" in any other case. It has two control lines; turn left and turn right until no object is in the way. when device hits an object it should turn right until no object is in the way. The next time it hits an object, it should turn left until it is clear of the object and repeats.

Can anyone help me with Mealy state transition diagram or how to setup the problem?

Homework Equations



j k c Q+ Qbar+
0 0 Q Qbar
0 1 1 0
1 0 1 0
1 1 Qbar Q

Q+ = J(Qbar) + (Kbar)Q

The Attempt at a Solution



I've tried setting up the states but when I go through the states it won't go left and then right. The state diagram I had setup went from right, right, and left..its somewhat hard to explain

thanks for your help
 
Physics news on Phys.org
  • #2


Thank you for sharing your difficulty with the problem. Based on the information provided, it seems like you are trying to design a Mealy state transition diagram for a device that turns left and right based on the output of a sensor.

To begin, let's define the states of the device. Since the device has two control lines - turn left and turn right - we can have four states: S0, S1, S2, and S3. S0 represents the initial state when the device is turned on and there is no object in front of it. S1 represents the state when the device is turning left, S2 represents the state when the device is turning right, and S3 represents the state when the device is clear of the object.

Next, we need to determine the inputs for each state. Since the sensor output is "1" when the device hits an object and "0" in any other case, we can use this as our input. In states S0 and S3, the input will be "0" since there is no object in front of the device. In states S1 and S2, the input will be "1" since the device has hit an object.

Now, we can determine the outputs for each state. In states S0 and S3, the device should not turn, so the output can be "no turn". In states S1 and S2, the device should turn left or right, respectively, so the output can be "turn left" and "turn right".

Based on this information, we can design the Mealy state transition diagram as follows:

S0 (no turn) --0--> S0 (no turn)
S0 (no turn) --1--> S1 (turn left)
S1 (turn left) --0--> S3 (no turn)
S1 (turn left) --1--> S1 (turn left)
S2 (turn right) --0--> S3 (no turn)
S2 (turn right) --1--> S2 (turn right)
S3 (no turn) --0--> S0 (no turn)
S3 (no turn) --1--> S2 (turn right)

I hope this helps with your problem. If you are still having trouble, don't hesitate to reach out for further assistance. Good luck with your design!
 
  • #3


I understand your difficulty with this problem. Designing a synchronous controller with JK flip flops for object detection can be a complex task, but with a clear understanding of the problem and some basic principles, it can be achieved successfully.

To begin, we need to understand the purpose of the controller and its inputs and outputs. The controller's main function is to turn the device whenever it hits an object. The sensor on the front of the device provides an input of "1" when an object is detected and "0" when there is no object. The controller has two control lines, "turn left" and "turn right," which will determine the direction of the turn. The output of the controller will be the direction in which the device should turn.

Now, let's look at the Mealy state transition diagram. The states of the controller will be "left," "right," and "clear." The initial state will be "clear" as the device is not facing any object. From the "clear" state, if the sensor detects an object, the controller should transition to the "right" state. This means the device should turn right until it is clear of the object. Once the sensor detects no object, the controller should transition back to the "clear" state. Similarly, if the sensor detects an object again from the "clear" state, the controller should transition to the "left" state. This means the device should turn left until it is clear of the object. Once the sensor detects no object, the controller should transition back to the "clear" state. This cycle will repeat every time an object is detected.

Now, let's look at the JK flip flops. The J and K inputs will be connected to the "turn right" and "turn left" control lines respectively. This means that when the "turn right" control line is activated, the J input will be set to "1" and the K input will be set to "0." This will cause the flip flop to toggle and change the output from "0" to "1" or vice versa. Similarly, when the "turn left" control line is activated, the J input will be set to "0" and the K input will be set to "1," causing the flip flop to toggle.

In conclusion, designing a synchronous controller with JK flip flops for object detection requires a clear understanding of the problem and the use of the Mealy state transition
 

1. What is a JK flip flop?

A JK flip flop is a type of digital logic circuit that is used to store and manipulate binary data. It has two inputs, J (set) and K (reset), and two outputs, Q (output) and Q' (inverted output).

2. How does a JK flip flop work?

A JK flip flop works by using a feedback mechanism to store and transfer binary data. The J and K inputs control the state of the flip flop, and when a clock pulse is applied, the output will change based on the current state and the inputs.

3. What are the applications of a JK flip flop?

JK flip flops are commonly used in digital electronics for tasks such as storing data, counting pulses, and implementing sequential logic circuits. They are also used in microprocessors and memory devices.

4. What is the difference between a JK flip flop and a D flip flop?

The main difference between a JK flip flop and a D flip flop is the presence of the reset (K) input in the JK flip flop. This allows for more flexibility in terms of data storage and manipulation. Additionally, the output of a D flip flop changes only on the rising edge of the clock pulse, while the output of a JK flip flop can change on both the rising and falling edges.

5. How do you design a JK flip flop?

To design a JK flip flop, you will need to determine the specific requirements of your circuit, such as the clock frequency and the desired output. Then, you can use a logic gate diagram or a truth table to design the circuit and choose the appropriate components. It is also important to consider factors such as propagation delay and setup/hold time to ensure proper functionality.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
20
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
Back
Top