flip flop sect 2

31
Chapter 7 Section 2 Flip-flop Clock input Master-Slave Flip-flop Edge-triggerred Flip-flop 1

Upload: bink-bonk

Post on 16-Apr-2017

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Flip Flop Sect 2

Chapter 7Section 2

Flip-flop• Clock input• Master-Slave Flip-flop• Edge-triggerred Flip-flop

1

Page 2: Flip Flop Sect 2

Clock input•Flip-flops are made from gated latches

(latches with control input).

•The state of a flip-flop is switched by a momentary change in control input known as clock.

•A flip-flop may response to produce output based on 3 types of clock signal:

1)Positive level trigger 2)Positive edge trigger 3)Negative edge trigger.

2

Page 3: Flip Flop Sect 2

3

Figure of Clock Signals

Page 4: Flip Flop Sect 2

• Positive level response allows changes in the output when the input changes while the clock pulse stays at logic ‘1’

• Problem may occur when more than 1 changes happen at the input signal and output will keep on changing following the input signal as long as the trigger signal still stay in positive level.

• This cause confusion and therefore positive level triggering is less preferred. On the other hand, edge triggering is more commonly used.

• For positive edge response/triggering, the output will change according to the input only during the positive transition of trigger signal.

• For negative edge response/triggering, the output will change according to the input only during the negative edge of trigger signal.

4

Page 5: Flip Flop Sect 2

Edge-triggered Flip-flop•There are 2 ways to construct an edge

triggered flip-flop:▫Master-Slave configuration

▫Efficient arrangement of gated latch

5

Page 6: Flip Flop Sect 2

Edge-triggered D flip-flop •D flip-flop is constructed with 2 D latches

and an inverter (Master-Slave)

6

Page 7: Flip Flop Sect 2

•When CLK (clock) is 1, master D latch is enabled but slave D latch is disabled. Input (D) will be transferred to Y. Y output will change whenever input D changes at this condition.

•When CLK changes to 0, slave D latch is enabled but master D latch is disabled. Data at Y will be transferred to Q.

•As a result, this edge-triggered D flip-flop is actually a negative edge-triggered D flip-flop. (change in the output during transition from ‘1’ to ‘0’ )

7

Page 8: Flip Flop Sect 2

•Characteristic (next state) equation for D Flip-flop

Q(t+1) = Q* = D

•Characteristic (truth, function) table,

8

Page 9: Flip Flop Sect 2

•Edge-triggered D flip-flop using 3 SR latches ,

9

Page 10: Flip Flop Sect 2

Operation of the D Flip-flop• If D = 0, when CLK becomes 1, R 0, Q 0, flip-

flop is reset. If there are further changes in the input, R remains as 0. (The flip-flop is locked out).

•During D = 0 and CLK return to 0, R 1 but output remain unchanged (Q = 0).

• If D = 1 when CLK becomes 1, S 0, Q 1, flip-flop is set. If there are further changes in the input, S remains as 1. (The flip-flop is locked out).

•During D = 1 and CLK return to 0, S 1 but output remain unchanged (Q = 1).

•As a result, this edge-triggered D flip-flop is actually a positive edge-triggered D flip-flop.

10

Page 11: Flip Flop Sect 2

•Graphical symbol for edge D flip-flop.

11

The triangle symbol in front of C designating that the flip-flop responds to edge triggering

a) Positive edge-triggered D flip-flop

b) Negative edge-triggered D flip-flop

Inputs

Comments

1

CLKD

Outputs

1

QQ

0 SET0 0 1 RESET

Inputs

Comments

1

CLKD

Outputs

1

QQ

0 SET0 0 1 RESET

Page 12: Flip Flop Sect 2

JK Flip-Flops• JK flip-flop is constructed by using the D

flip-flop and external logic gates.

12

Page 13: Flip Flop Sect 2

•There are 4 operations performed by the JK flip-flop: ▫Set output to 1▫Reset output to 0▫Complement its previous output▫Hold its previous o/p

•The J input sets the flip-flop output to 1 and the K input resets the output to 0.

•When both J K inputs are 1, the output is the complement of the previous output.

13

Page 14: Flip Flop Sect 2

•The expression of the circuit (next state equation),

Q* = D = JQ’ + K’Q

•The JK flip-flop characteristic table,

14

Inputs

Comments

1

1 1

1

CLKKJ

Outputs

1

QQ

Q0

Q0

Q0

Q0

0 SETToggle

0

0

00 0 1 RESET

No change

Page 15: Flip Flop Sect 2

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Floyd, Digital Fundamentals, 10th ed

Determine the Q output for the J-K flip-flop, given the inputs shown.

CLK

Q

K

J

CLK

K

J

Q

Q

Notice that the outputs change on the leading edge of the clock.

Set Toggle Set Latch

Page 16: Flip Flop Sect 2

T Flip-Flops•The T (toggle) flip-flop is a complementing

flip-flop and can be obtained from a JK flip-flop when inputs J and K are tied together.

•The graphical symbol for T flip-flop ,

16

Page 17: Flip Flop Sect 2

•The expression of the T flip-flop,Q* = D = TQ’ + T’Q = T Q

•The characteristic table,

17

Page 18: Flip Flop Sect 2

Edge-triggered flip-flop timing matter• 3 important timing matter need to be considered while using

edge-triggered flip-flop:

1. Setup time: Minimum time for which the D input must be maintained at a constant value prior to the occurrence of the clock transition.

2. Hold time: Minimum time for which the D input must not change after the application of the positive transition of the clock.

3. Propagation delay time: The interval time between the trigger edge and the stabilization of the output to a new state.

• Propagation delay of a gate is the average transition-delay time for the signal to propagate from input to output when the binary signal changes in value. Usually, propagation delay is measured in nanoseconds (ns).

18

Page 19: Flip Flop Sect 2

Direct (asynchronous) inputs•Direct inputs are useful for bringing all flip-

flops in a system to a known starting state prior the clocked operation

•Some flip-flops have asynchronous inputs that are used to force the flip-flop to a particular state independent of the clock.

•The input that sets the flip-flop to 1 is called ‘preset’ or direct set.

•The input that clears the flip-flop to 0 is called ‘clear’ or direct reset.

19

Page 20: Flip Flop Sect 2

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Floyd, Digital Fundamentals, 10th ed

Two such inputs are normally labeled preset (PRE) and clear (CLR). These inputs are usually active LOW. A J-K flip flop with active LOW preset and CLR is shown.

CLK

K

J

Q

Q

PRE

CLR

Page 21: Flip Flop Sect 2

© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Floyd, Digital Fundamentals, 10th ed

Determine the Q output for the J-K flip-flop, given the inputs shown. CLK

K

J

Q

Q

PRE

CLRSet Toggle Reset Toggle

Set

Set

Reset

LatchCLK

K

J

Q

PRE

CLR

Page 22: Flip Flop Sect 2

Section 3Sequential Logic Circuit Analysis

22

Page 23: Flip Flop Sect 2

Introduction•The behavior of a synchronous sequential

circuit is determined from the inputs, the outputs and the states of its flip-flop.

•The outputs and the next state are both a function of the inputs and the present state.

•There are 3 methods to analyze a sequential circuit: state equations, state table and state diagram.

23

Page 24: Flip Flop Sect 2

State Equations•The behavior of the sequential circuit can be expressed algebraically in Boolean expressions, which include the necessary time sequence either directly or indirectly.

•A state equation or transition equation specifies the next state as a function of the present state and inputs.

•The Boolean expressions for state equations can be derived directly from the gates that from the combinational circuit part of the sequential circuit.

24

Page 25: Flip Flop Sect 2

•Consider the example,

25

A* = Ax + BxB* = A’xy = (A+B)x’

• State Equations:

A(t+1) = A(t)x(t) + B(t)x(t)B(t+1) = A’(t)x(t)y (t) = (A(t)+B(t))x’(t)

Note: QD(t+1) = D(t)QD(t+1) = A(t+1)A(t+1) = D(t)

Page 26: Flip Flop Sect 2

State Table•The time sequence of inputs, outputs and

flip-flop states can be enumerated in a state table or transition table.

•There are 2 forms of state table. The difference is the number of items in the table.

•1st form: Table consists of present state, input, next state and output.

•2nd form: Table consists of present state, next state and output.

26

Page 27: Flip Flop Sect 2

•By referring to the earlier example, the format of the state table for 1st form as shown below;

27

A* = Ax + BxB* = A’xy = (A+B)x’

Page 28: Flip Flop Sect 2

•By referring to the earlier example, the format of the state table for 2nd form as shown below;.

•The input conditions are enumerated under the next-state and output sections.

28

Page 29: Flip Flop Sect 2

State Diagram•The information available in a state table

can be represented graphically in the form of a state diagram.

•Example of state diagram is shown below;

29

Page 30: Flip Flop Sect 2

•A state is represented by a circle and the transitions between states are indicated by directed lines connecting the circles

•The binary number inside each circle identifies the state of the flip-flops.

•The directed lines are labeled with 2 binary numbers separated by a slash.

•The first number gives the input value during the present state and the number after the slash gives the output value during the present state with the given input.

30

Page 31: Flip Flop Sect 2

31

A* = Ax + BxB* = A’xy = (A+B)x’