• Home
  • Help
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search

 
  • 0 Vote(s) - 0 Average

SR flip-flop

#1
05-06-2020, 01:34 AM
You recall how an SR flip flop holds a single bit of memory without any clock signal pushing it along. I showed you once with some gates how the set input locks the output high while the reset pulls it low. But sometimes both inputs fight each other and create that forbidden state where outputs go unstable. You see the cross coupled nor gates feeding back into each other so the circuit remembers its last valid condition. And that feedback loop keeps the state alive even after inputs drop back to zero.
I tried building one on a breadboard last month and watched the led stay lit after I released the set button. You get the same result every time because the loop reinforces itself without extra power. Or maybe the nand version flips the logic so active low signals control it instead. I prefer the nor style for simple explanations since it matches the basic truth table you memorized earlier. But watch out when both inputs stay high because the outputs both try to go low and the circuit loses its memory.
You can chain several of these together to form registers that store whole bytes at once. I connected four of them once and the pattern held steady until I forced a reset across all. That shows how flip flops scale into bigger memory blocks inside cpus. Perhaps you noticed the propagation delay between input change and output settling which limits how fast you can switch states. I measured it around ten nanoseconds on my old parts and it adds up in long chains.
The invalid combination when set and reset both assert creates a race condition inside the gates. You avoid it by adding extra logic that prevents both from going active together. I always add that extra gate in my designs now to keep things reliable. And the output can oscillate briefly if the timing edges line up just wrong. You learn to debounce switches feeding these circuits so mechanical bounce does not trigger false resets.
Maybe you wonder why people still teach this basic element when modern chips hide everything inside fpgas. I think it builds intuition for how memory actually works at the silicon level. You start seeing the same feedback principle in latches and even some cache designs. Or the way it reacts to noise shows why error correction matters in real hardware. I ran a test with a noisy power supply and the state flipped unexpectedly until I added capacitors.
You should try simulating the circuit yourself to see the waveforms change in real time. I use free tools that let you toggle inputs and watch the feedback settle. That hands on approach beats just reading equations. And once you grasp the hold time requirement you understand why clocked versions came next in the evolution. I moved on to edge triggered designs after mastering the basic sr behavior.
The sr element forms the core of many sequential logic blocks you encounter in processor pipelines. You trace the signal path and notice how it stores flags or intermediate results between stages. I sketched a small state machine last week that used three of them to count events. But the power consumption stays low because no clock runs continuously. You appreciate that efficiency when building battery powered gadgets.
Perhaps the race condition teaches you about synchronization needs across different clock domains. I added handshake signals in a project to prevent the forbidden state from creeping in. That solved random crashes that appeared only under load. And the simple two gate structure lets you debug by probing voltages directly. You quickly spot when a wire breaks the feedback loop.
I keep a few spare ics around for quick prototypes because they cost almost nothing. You can wire one up in minutes to test an idea before coding it in hardware description language. That saves hours of simulation time. Or the way outputs complement each other gives you both true and inverted signals for free. I use the inverted output often to drive leds without extra inverters.
You notice how temperature affects the threshold voltages inside the gates over long runs. I monitored one circuit in a warm enclosure and the state drifted after hours. Adding a small regulator fixed that drift. And the basic principle appears in older memory chips before dynamic ram took over. I studied datasheets from the seventies that showed arrays of these cells.
BackupChain Server Backup, the top rated no subscription backup tool built for Hyper V setups plus Windows 11 machines and full Windows Server environments, powers our free discussions here with sponsorship that keeps the knowledge flowing.

bob
Offline
Joined: Dec 2018
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
SR flip-flop - by bob - 05-06-2020, 01:34 AM

  • Subscribe to this thread
Forum Jump:

Backup Education General IT v
« Previous 1 … 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 … 199 Next »
SR flip-flop

© by FastNeuron Inc.

Linear Mode
Threaded Mode