Professional Documents
Culture Documents
Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require memory elements Memory elements are digital circuits that can store and retrieve data in the form of 1's and 0's. The output of the systems with memory depends not only on present inputs but also on what has happened in the past SR latch is an example of memory circuits that can store one bit of information
A. Abhari CPS213 1
SR Latch
When SR latch is storing a 1 then its Q is 1 and when storing 0 its Q is 0
R S
Q Q
A. Abhari
CPS213
SR Latch
1. If SR=10 then Q=1 and the latch is storing a 1, We call this setting the Latch. 2. If SR =10 and we change to SR=00 then the latch will remain set with Q= 1. In other words it "remembers" to stay set 3. If SR=01 then Q=0 and the latch is storing a 0. We call this resetting or Clearing the latch 4. If SR =01 and we change to SR=00 then the latch will remain set with Q= 0. We call the value of Q at any given time the state of the latch
A. Abhari CPS213 3
SR Latch
The circuit (in next slide) with NOR gates is able to do this because of the feedback from the output back to the input Note that both Q and Q' are "brought back" and connected to the inputs of the NOR gates If both S (set) and R (reset) are 1 an undefined state with both output equal to 0 occurs ( it means the SET and RESET commands are issuing at the same time).
A. Abhari CPS213 4
A. Abhari
CPS213
SR Latch
The SR latch with two cross-coupled NAND gate is shown in next slide. By setting S to 0 the output Q will be 1 that putting the latch in the set state If S goes to 1 the circuit remains in set state By setting R to 0 the circuit goes to reset state and stay there even after both input returns to 1 The undefined state is when both input are 0 Because NAND latch requires 0 signal to change its state it is also called S-R latch
A. Abhari CPS213 6
A. Abhari
CPS213
A. Abhari
CPS213
A. Abhari
CPS213
10
D latch is designed to eliminate the indeterminate state in SR latch by making sure that inputs S and R are never equal to 1 at the same time
A. Abhari
CPS213
11
A. Abhari
CPS213
12
JKFF
The JK flip-flop is an SRFF with some additional gating logic on the inputs in which the SR=11 (undetermined condition) doesnt exist J is used for the set and K is used for reset J K Q ------------------0 0 Q 0 1 0 1 0 1 1 1 Q
A. Abhari CPS213 13
TFF
By connecting K and J we can make TFF Qt T Qt + 1 ---------------------0 0 0 0 1 1 Qt 1 0 1 Qt 1 1 0
A. Abhari CPS213 14
A. Abhari
CPS213
16
A. Abhari
CPS213
18
A. Abhari
CPS213
20
State Table
The time sequence of inputs, outputs and flipflop states can be enumerated in a state table or transition table In the state table the present state that shows the state of flip flops comes first. So n flip flops need n present states. The inputs, next state and output come after. The combination of present state and inputs makes state table. Output and next state can be derived from the state equations
A. Abhari CPS213 21
State Table
There are two types of for state tables: Mealy Model: In this model sequential circuit or state table the outputs depends on inputs as well as states Moor Model: Where output depends on state. For example 2-D version of state table for previous circuit. Where there are only 4 different states and for each state the next states and outputs should be found based on the given inputs.
A. Abhari CPS213 22
State Diagram
Is the graphically representation of state table. Each state should be circled so for example if we have n flip flops we have 2n states or n circles Each circle should be labeled by a binary number. By using the state table the arrows can be drawn which show changes from each state to another state. At the top of each arrow input/output is shown Also at the top of each arrow only input(s) can be shown. See next slide
A. Abhari CPS213 23
A. Abhari
CPS213
24
A. Abhari
CPS213
25
A. Abhari
CPS213
26
A. Abhari
CPS213
27
A. Abhari
CPS213
28
A. Abhari
CPS213
29
A. Abhari
CPS213
30
A. Abhari
CPS213
32
A. Abhari
CPS213
33
A. Abhari
CPS213
34
A. Abhari
CPS213
35