Actions

User

Difference between revisions of "Carsten Milkau/D-Latch"

From Unofficial Stationeers Wiki

< User:Carsten Milkau
(Using Select and Reader Unit: add image)
(Using Select Unit and Logic Reader: if enabled then stored = data else stored = output (not the other way around))
Line 28: Line 28:
 
<li>a select unit determines whether to store the last output or the "data" input using the "enabled" input. i.e.  
 
<li>a select unit determines whether to store the last output or the "data" input using the "enabled" input. i.e.  
 
<pre>  if enabled
 
<pre>  if enabled
   then stored = output
+
   then stored = data
   else stored = data</pre></li>
+
   else stored = output</pre></li>
 
<li>a [[Kit_(Logic_I/O)#Logic_Reader|logic reader]] mirrors the stored value 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.
 
<li>a [[Kit_(Logic_I/O)#Logic_Reader|logic reader]] mirrors the stored value 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 = stored</pre></li>
 
<pre>  output = stored</pre></li>
 
</ol>
 
</ol>

Revision as of 15:49, 17 July 2018

D-latch

A d-latch is a circuit that stores the last value seen at its "data" input while its "enable" input was on.

enabled data previous output output
0 x y y
1 x y x

In theory, a single 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

  • Enabled: if 1, store data, else do nothing.
  • Data: input
  • Output: stored value

Using Select Unit and Logic Reader

D-latch using select unit and reader

This d-latch can store any value. It works in two steps:

  1. a select unit determines whether to store the last output or the "data" input using the "enabled" input. i.e.
      if enabled
      then stored = data
      else stored = output
  2. a logic reader mirrors the stored value 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.
      output = stored