Editing Carsten Milkau/RS-Latch
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | == RS-latch == | |
− | + | An RS-latch is a circuit that stores which of its inputs was last "on". It has typically two inputs: input ''reset'' storing value "0" and input ''set'' storing value "1", hence the name. It can have multiple outputs, which typically differ mostly in their behavior when multiple inputs are "on" at the same time. | |
{| class="wikitable" | {| class="wikitable" | ||
Line 19: | Line 19: | ||
|} | |} | ||
− | It is possible to define a variant with more than two values. | + | It is possible to define a variant with more than two values. The values stored need not necessarily be 0 and 1. |
=== Connectors === | === Connectors === | ||
− | * | + | * Enabled: if 1, store ''data'', else do nothing. |
− | + | * Data: input | |
− | * | + | * Output: stored value |
− | * | ||
− | === | + | === Using Logic Select Unit and Logic Reader === |
− | + | [[File:D-latch.png|thumb|D-latch using select unit and reader]] | |
− | + | This d-latch can store any value. It works in two steps: | |
− | [[ | + | <ol> |
+ | <li>a Logic Select Unit determines whether to store the last output or the "data" input using the "enabled" input. i.e. | ||
+ | <pre> if enabled | ||
+ | then store = data | ||
+ | else store = output</pre></li> | ||
+ | <li>a [[Kit_(Logic_I/O)#Logic_Reader|Logic Reader]] mirrors the value to be stored and feeds it back into the select unit so it can circulate (effectively being stored). This would be obsolete if the select unit could read its own output. | ||
+ | <pre> output = store</pre></li> | ||
+ | </ol> | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 43: | Line 48: | ||
! Unit name || Unit type || Connector / Setting || Source / Value | ! Unit name || Unit type || Connector / Setting || Source / Value | ||
|- | |- | ||
− | | select 1 || Logic Select Unit || select | + | | select 1 || Logic Select Unit || select || '''enabled''' (input) |
|- | |- | ||
− | | || || 0 (input 1) | + | | || || 0 (input 1) || reader 1 |
|- | |- | ||
− | | || || 1 (input 2) | + | | || || 1 (input 2) || '''data''' (input) |
|- | |- | ||
− | | | + | | reader 1 || Logic Reader || in || select 1 |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | || || | + | | || || var || setting |
|- | |- | ||
− | | || || | + | | || || out || '''output''' (output) |
|} | |} |