Sample Mode
RR-CirKits node I/O ports support what is called Sample Mode. Sample mode is used for Touch Toggles or other dual mode situations where the input and output states of a line may not necessarily be the same. What this means is that a single line may be used for both input and output at the same time at no extra cost. Obviously this is not actually possible, but what happens is that the line spends 99% of the time as an output, and 1% of the time as an input. During the ‘Input’ portion of each period the output is turned off and the resulting input state is read.
For this to work without damage to the drivers the ‘input’ must not actually be connected to either 5V, nor to common. (0V) This is accomplished by including a 1K series resistor in the input connection. (our boards such as the BOD4-CP include this resistor) The other restriction is that the output load may not exceed 10K to 5V or else the 1K input will be excessively loaded and not be read properly when low. The normal output load must also be tolerant of brief changes during the input sample interval. This is the exact circuit of a Berrett Hill Touch Trigger which may be directly connected to an I/O line.
To use this option the CDI contains some special options. The line still needs to be configured only as ‘Input’ or ‘Output’, never as both. Note that the ‘on’-‘off’ time delays are used as function output delays or input debounce delays depending on the line’s status.
Output Sample options include:
- Sample Steady Active Hi’ or ‘Sample Steady Active Lo’ mean the output line is steady but the line is sampled to determine its input state. Note that this requires specially designed devices such as the Berrett Hill Touch Trigger or the RR-CirKits BOD4-CP board that can support both input and output data on the same wire.
- Alt Sample Steady Active Hi’ or ‘Alt Sample Steady Active Lo’ mean the same as above except that the ‘Sample’ input alternates between ‘on’ and ‘off’ with each successive input change. This is normally used with Touch Triggers and the BOD4-CP push button inputs to monitor the same device that is being controlled.
- ‘Sample Pulse Active Hi’ or ‘Sample Pulse Active Lo’ are the same as ‘Pulse Active Hi’ or ‘Pulse Active Lo’ with the inclusion of input sampling.
- ‘Alt Sample Pulse Active Hi’ or ‘Alt Sample Pulse Active Lo’ may be used to configure a single line to trigger alternate pulses to control a dual coil switch machine, and also monitor one of the coils.
Input Sample options Include:
- ‘Sample Hi’ and ‘Sample Lo’
- ‘Alt Sample Hi’ and ‘Alt Sample Lo’
Each of the above options work the same as their unsampled equivalents do, with the addition of the sampling. In Sample mode both a lines Consumers (C) and a lines Producers (P) become active.