Latches
Notes
- Carpinelli chapter 6.2
- A latch is a device that maintains its state after being activated and changes whenever the input is changed.
- A flip-flop is a device that maintains its state after being activated but changes only on a clock change.
- Flip-flops are built from latches.
- We will begin with latches
- The R-S or SR latch is the simplest.
- Input:
- S set the circuit
- R reset the circuit
- NOTE: We do not expect both set and reset to be high at the same time.
- Output
- Q and Q. The state of the latch.
- There are several implementation of a rs-latch
-
- The difference is the action when R=1 and S=1
- For the nor gate versions it is 0
- For the nand gate versions it is 1.
- These are modified with an enable line
- Just add another input, enable
- And this with S and R respectively
- Note, this is still not edge triggered.
-
- Note: I think rs/sr latch/flip-flop are somewhat interchangeable.
- Frequently we don't care about set or reset, we want to store data
- This is the D-latch.
- One input: D the data
- Outputs Q and Q
- Actually it is a simple modification to the rs-latch
-
- This is not completely satisfying as when the data on d changes, the latch changes.
- So add an enable line.
-
- There are other latches, but these two will do.
- My digital file