|Next Page of this Chapter|
This chapter of the course will discuss how to start using flip-flops to satisfy less trivial circuits. The first stage of this process is one of state assignment from a specification we have been given to a combination of flip-flops and combinational logic. When we talk about states, we refer to the number of present states in a particular circuit (as discussed in Chapter 4 - State Diagrams and Tables). For example this state diagram has 4 internal states.
As a general rule, any circuit with 2 internal states will need 1 flip-flop
in its implementation.
Lets consider an example to help us learn about the start of this process.
Consider the state table shown below. The system is a vending machine and has two inputs X1 (say for 10p) and X2 (say for 20p). The inputs are input pulses and come from a coin sensor that will NOT produce X1 and X2 pulses at the same time (Note: no clock signal is present). There is also an output to the system that releases some crisps, this is a singular level output Z. Once the crisps have been released, there is an automatic reset to the system that we do not have to worry about.
We can immediatly observe that there are only four internal states, meaning that we require two flip-flops of some description. Let us see what the circuit actually does before moving on any further:
The general operation of this circuit is that someone will pay 30p for a bag of crisps. No change is given as the system is reset, so users can pay 50p instead of 30p. This state transition diagram should clarify our problem.
As we are using two flip-flops (as discussed above)
there will be two main outputs, one from each flip-flop. The two outputs
from the flip-flops must then be dealt with to send the release signal
to the rest of the system. We shall assign each output as Y1 and Y2
for flip-flop 1 and flip-flop 2 respectfully. The outputs Y1 and Y2
can have output combinations Y2Y1 = 00, 01, 10, and 11. Y1 and Y2 will
of course be used to send the release signal, we will need some additional
logic for this.
Lets walk through one of the lines of information above:
The process of understanding this second state table is exactly the same for every other state. If you can understand the above explanation, then you will be able to interpret the whole table.
Once you have understood this part of the chapter then you are more than ready to move on. Do not worry too much if the method of state assignment is unclear at this stage. Complete the example, and then re-read sections that you are unhappy with. There will be another example to follow just incase you are still not understanding the theory.