Re: "DIfference between "LATCH" and "FLI
A Latch is a bistable device that remains in a given state until driven to the opposite state by an asynchronous input. It has 2 asynchronous inputs: a "Set" input which puts the latch in the "1" state, and a "Reset" (Clear) input that puts the latch in the "0" state.
.
A flip-flop is a device that contains a latch, plus additional circuitry that cause the latch to change state only on a clock edge. The clock edge to which the flip-flop responds depends on the design. It can be either the positive-going or the negative-going edge. The state change that takes place is performed according to a set of rules that are determined by the type of flip-flop:
.
"T" type:
. output reverses state after each clock edge.
.
"S-R" type
. S R Next state
. 0 0 No Change
. 0 1 0
. 1 0 1
. 1 1 This input combination is not allowed. Result is undefined.
'
"J-K" Type (Same as R-S type, except 1 1 input combination is allowed)
. J K
. 0 0 No Change
. 0 1 0
. 1 0 1
. 1 1 Toggles (Changes to opposite state)
.
To further complicate things, many flip-flops have direct "asynchronous" Set and Reset (Clear) inputs that force the output to a specific state independently of the clock. Use of these inputs results in the flip-flop behaving as a latch. The result of simultaneous application of the direct set is design dependent. However, the direct set or direct reset input that is removed last is the one that "wins", i.e., determines the output state.
Regards,
Jon