Actions

User

Editing Carsten Milkau/D-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:
 +
== D-latch ==
 +
 
A d-latch is a circuit that stores the last value seen at its "data" input while its "enable" input was on.
 
A d-latch is a circuit that stores the last value seen at its "data" input while its "enable" input was on.
  
== Definition ==
+
{|
 
+
|enabled||data||previous output||output
{| class="wikitable"
 
|+ value table
 
|-
 
!colspan="3"|'''inputs'''||'''outputs'''
 
|-
 
!enable||data||previous output||output
 
 
|-
 
|-
|0||''x''||''y''||''y''
+
|0||x||y||y
 
|-
 
|-
|1||''x''||''y''||''x''
+
|1||x||y||x
 
|}
 
|}
 +
 +
In theory, a single [[Kit_(Logic_Processor)#Logic_Select_Unit|select unit]] can do this (selector input = enable, input 1 = data, input 2 = output, output = output). In practice, this is not possible as the game does not allow it to have its own output as input. However, several constructions using two or more circuits are possible.
  
 
=== Connectors ===
 
=== Connectors ===
  
* enable: if 1, store ''data'', else do nothing.
+
* Enabled: if 1, store ''data'', else do nothing.
* data: input
+
* Data: input
* output: stored value
+
* Output: stored value
  
== Relation to Multiplexer (Logic Select Unit) ==
+
=== Using Select and Reader Unit ===
  
In theory, a single multiplexer ([[Kit_(Logic_Processor)#Logic_Select_Unit|Logic Select Unit]]) can do this (selector input = enable, input 1 = output, input 2 = data, output = output). In practice, this is not possible as the game does not allow it to have its own output as input. However, several constructions using two or more circuits are possible.
+
This d-latch can store any value. It works in two steps:
 
 
== Implementation 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:
+
==== Step 1 : Selection ====
 +
a select unit determines whether to output the "stored value" or the "data" input using the "enabled" input. i.e.  
  
<ol>
+
  if enabled
<li>a Logic Select Unit determines whether to store the last output or the "data" input using the "enable" input. i.e.
+
   then output = stored
<pre>  if enable
+
   else output = data</code>
   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>
 
  
 +
==== Step 2: Feedback ====
 +
a reader unit feeds the output value 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.
  
{| class="wikitable"
+
  stored = output
|+ Circuit setup
 
|-
 
! Unit name || Unit type    || Connector / Setting || Source / Value
 
|-
 
| select 1  || Logic Select Unit  || select        || '''enable''' (input)
 
|-
 
|          ||              || 0 (input 1)    || reader 1
 
|-
 
|          ||              || 1 (input 2)    || '''data''' (input)
 
|-
 
| reader  1 || Logic Reader || in            || select 1
 
|-
 
|          ||              || var            || setting
 
|-
 
|          ||              || out            || '''output''' (output)
 
|}
 

Please note that all contributions to Unofficial Stationeers Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unofficial Stationeers Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)