33
Latches, Flip-Flop and Pewaktu (Timer) Program Studi T. Elektro FT - UHAMKA Slide - 8 1 Endy Sjaiful Alim Endy Sjaiful Alim Program Studi Teknik Elektro Fakultas Teknik Universitas Muhammadiyah Prof. Dr. HAMKA

Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Latches, Flip-Flop andPewaktu (Timer)

Program Studi T. ElektroFT - UHAMKA

Slide - 8 1

Endy Sjaiful AlimEndy Sjaiful AlimProgram Studi Teknik Elektro

Fakultas TeknikUniversitas Muhammadiyah Prof. Dr. HAMKA

Page 2: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Latches

The output of a latch depends on its current inputs and on itsprevious output and its change of state can happen at any timewhen its inputs change

Program Studi T. ElektroFT - UHAMKA

Slide - 8 2

The output of a latch depends on its current inputs and on itsprevious output and its change of state can happen at any timewhen its inputs change

S-R (Set-Reset) Latch Gated S-R Latch Gated D Latch

Page 3: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

S-R Latch

Program Studi T. ElektroFT - UHAMKA

Slide - 8 3

Page 4: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

S-R Latch

Program Studi T. ElektroFT - UHAMKA

Slide - 8 4

Page 5: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Negative-OR Equivalent of theNAND gate /S-/R Latch

11

0

1 SET state

When /R is LOW and/S is HIGH

Program Studi T. ElektroFT - UHAMKA

Slide - 8 5

1

10

0 When /R is LOW and/S is HIGH

Q is LOW and thisCondition We call itRESET state

Page 6: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Example:

Determine thewaveform that will beobserved on the Qoutput. Assume that Qis initially LOW

Program Studi T. ElektroFT - UHAMKA

Slide - 8 6

Page 7: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

The Gated S-R LatchA gated latch requires an Enable input, EN (G is also used todesignated an enable input). The S and R inputs control thestate to which the latch will go when a HIGH level is applied tothe EN input. The latch will not change until EN is HIGH.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 7

Initially RESET

Page 8: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Truth Table for Gated S-R Latch

S R EN Q Q’

0 0 0 Q Q’ Hold

1 0 0 Q Q’ Hold

0 1 0 Q Q’ Hold

1 1 0 Q Q’ Hold

0 0 1 Q Q’ Hold

1 0 1 1 0 Set

0 1 1 0 1 Reset

1 1 1 0 0 not allowedProgram Studi T. ElektroFT - UHAMKA

Slide - 8 8

S R EN Q Q’

0 0 0 Q Q’ Hold

1 0 0 Q Q’ Hold

0 1 0 Q Q’ Hold

1 1 0 Q Q’ Hold

0 0 1 Q Q’ Hold

1 0 1 1 0 Set

0 1 1 0 1 Reset

1 1 1 0 0 not allowed

Page 9: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

The Gated D LatchOnly has one input in addition to EN. This input is called the D (data) input.

-When the D input is HIGH and the EN input is HIGH, the latch will SET.

-When the D input is LOW and EN is HIGH, the latch will RESET.

-Another way, the output Q follows the input D when EN is HIGH

Program Studi T. ElektroFT - UHAMKA

Slide - 8 9

Initially RESET

Page 10: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Edge-Triggered Flip-Flops

Edge-triggered S-R flip-flop Edge-triggered D flip-flop Edge-triggered J-K flip-flop

Program Studi T. ElektroFT - UHAMKA

Slide - 8 10

Edge-triggered S-R flip-flop Edge-triggered D flip-flop Edge-triggered J-K flip-flop

Page 11: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Edge-Triggered Flip-Flop Logic Symbols (Top: PositiveEdge-Triggered; Bottom: Negative Edge-Triggered).

Program Studi T. ElektroFT - UHAMKA

Slide - 8 11

Page 12: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

The Edge-Triggered S-R Flip-FlopThe S and R inputs of the S-R flip-flop are called synchronous input because dataon these inputs are transferred to the flip-flop’s output only on the triggering edgeof the clock pulse.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 12

OperationOperation

Page 13: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Operation of a positive edge-triggered S-Rflip-flop

Program Studi T. ElektroFT - UHAMKA

Slide - 8 13

ExampleExample

Page 14: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Example:

Determine the Q and /Q output waveforms of the flip-flop (Assume isinitially RESET)

Program Studi T. ElektroFT - UHAMKA

Slide - 8 14

Page 15: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Exercise:

Determine the Q and /Q output waveforms of the flip-flop (Assume isinitially RESET) and it is a negative edge-triggered device

Program Studi T. ElektroFT - UHAMKA

Slide - 8 15

Page 16: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

The Edge-Triggered D Flip-Flop

The D flip-flop is useful when a single data bit (1 or 0) is to be stored.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 16

ExampleExample

Page 17: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Example:

Determine the Q output waveform if the flip-flop starts out RESET

Program Studi T. ElektroFT - UHAMKA

Slide - 8 17

Try This: Determine the Q output for the D flip-flop if the Dinput is inverted

Page 18: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Answer for related question

Program Studi T. ElektroFT - UHAMKA

Slide - 8 18

Page 19: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

The Edge-Triggered J-K Flip-FlopThe J-K flip-flop is versatile and is widely used type of flip-flop. Thedifference is that he J-K flip-flop has no invalid state as does the S-R flip-flop.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 19

ExampleExample

Page 20: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Example:

Determine the Q output, assuming that the flip-flop is initially RESET

Program Studi T. ElektroFT - UHAMKA

Slide - 8 20

Page 21: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Exercise:

Determine the Q output, starting in the RESET state.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 21

Page 22: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Asynchronous Preset and ClearInputs

The state of the flip-flop independent of the clock. These preset and clearinputs must both be kept HIGH for synchronous operation.

Active-LOW preset and clear inputs

Program Studi T. ElektroFT - UHAMKA

Slide - 8 22

Active-LOW preset and clear inputs

Page 23: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Example:

Determine the Q output for the inputs shown in the timing diagram. Q isinitially LOW.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 23

SET Toggle RESET

Page 24: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Exercise:

Interchange the /PRE and /CLR waveforms, what will the Q outputlook like?

Program Studi T. ElektroFT - UHAMKA

Slide - 8 24

Page 25: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Flip-Flop Applications

Parallel Data Storage Frequency Division Counting

Program Studi T. ElektroFT - UHAMKA

Slide - 8 25

Parallel Data Storage Frequency Division Counting

Page 26: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Parallel Data StorageA common requirement in digitalsystems is to store several bits ofdata from parallel linessimultaneously in a group of flip-flops.

Program Studi T. ElektroFT - UHAMKA

Slide - 8 26

Page 27: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Frequency Division2n: n is number of flip-flops. Example: 2 flip-flop will divided frequencyby 4 (22)

Program Studi T. ElektroFT - UHAMKA

Slide - 8 27

Page 28: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Example: Develop the fout waveform for the circuit below when the 8kHz square wave input is applied to the clock input of flip-flop A

Program Studi T. ElektroFT - UHAMKA

Slide - 8 28

Page 29: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Counting

Program Studi T. ElektroFT - UHAMKA

Slide - 8 29

Page 30: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

The 555 Timer

Program Studi T. ElektroFT - UHAMKA

Slide - 8 30

Monostable (one-shot) operation Astable operation

Page 31: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Monostable (one-shot) operation

Program Studi T. ElektroFT - UHAMKA

Slide - 8 31

ttww=1.1R=1.1R11CC11

Page 32: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Astable operation

Program Studi T. ElektroFT - UHAMKA

Slide - 8 32

Page 33: Latches, Flip-Flop and Pewaktu (Timer)€¦ · Latches The output of a latch depends on its current inputs and on its previous output and its change of state can happen at any time

Thank YouJangan sangka kita adalah yang terbaikkerana kita belum kecapi kejayaan yangorang lain capai. Penghalang kejayaan

adalah fikiran sendiri, bukan kecacatan ataukekurangan

Program Studi T. ElektroFT - UHAMKA

Slide - 8 33

Jangan sangka kita adalah yang terbaikkerana kita belum kecapi kejayaan yangorang lain capai. Penghalang kejayaan

adalah fikiran sendiri, bukan kecacatan ataukekurangan