Trigger is a digital element, a bistable device that switches to one state and can remain in this state indefinitely even when external signals are removed. It is constructed from first-level logical elements (AND-NE, OR-NE, etc.) and refers to second-level logical devices.
In practice, triggers are available as microcircuits in a separate package or as elements in large integrated circuits (LSI) or programmable logic matrices (PLM).
Contents
Trigger Classification and Timing Types
Triggers are divided into two large classes:
- asynchronous;
- Synchronous (clocked).
The fundamental difference between them is that in the first category of devices the level of the output signal changes simultaneously with the change of the signal at the input(s). For synchronous triggers, the state changes only in the presence of a clocking signal at the input provided for this purpose. A special output, designated by the letter C (clock), is provided for this purpose. According to the type of strobing synchronous elements are divided into two classes:
- dynamic;
- static.
In the first type, the output level changes depending on the configuration of input signals at the moment when the edge (leading edge) or the falling edge of the clock pulse appears (depends on the specific type of trigger). Any signals can be fed to the inputs between the appearances of the clock edges (decays), the trigger state will not change. The second version does not change the clocking level, but the presence of one or zero on the Clock input is a sign of clocking. There are also complex trigger devices classified by:
- The number of steady states (3 or more, as opposed to 2 for basic elements);
- Number of levels (also more than 3);
- other characteristics.
Complex elements are of limited use in specific devices.
Types of triggers and the principle of their operation
There are several basic types of triggers. Before we get into the differences, we should note a commonality: When power is applied, the output of any device is set to an arbitrary state. If this is critical to the overall operation of the circuit, presetting circuits must be provided. In the simplest case, this is an RC circuit that forms the initial state setting signal.
RS Triggers
The most common type of asynchronous bistable device is the RS trigger. It refers to triggers with separate state 0 and 1 setting. There are two inputs for this:
- S - set (set);
- R - reset.
There is a direct output Q and it can also be the inversion output Q1. Its logic level is always opposite to Q - this is useful when designing circuits.
When a positive level is applied to the input S the output Q will be set to logic 1 (if there is an inverse output it will go to level 0). After that the signal on the setting input can change as you like - the output level will not be affected. As long as the one appears on the R input. This will set the trigger to state 0 (1 on the inverse pin). A change of the signal on the reset input will have no effect on the further state of the element.
Important! The variant when there is a logical 1 on both inputs is forbidden. The trigger will be set to an arbitrary state. This situation should be avoided when designing circuits.
The RS Trigger can be built based on commonly used dual input I-NE elements. This method is feasible on conventional chips as well as inside programmable arrays.
One or both inputs can be inverted. This means that on these pins the trigger is controlled by the appearance of a low rather than a high level.
If you build the RS Trigger with two I-NE input elements, then both inputs will be inverted - controlled by the supply of logic zero.
There is a gated version of the RS trigger. It has an additional C input. Switching occurs when two conditions are met:
- The presence of a high level on the Set or Reset input;
- The presence of a clock signal.
Such an element is used when it is necessary to delay switching, for example, for the time of the end of transients.
D-triggers
D-trigger ("transparent trigger", "latch") belongs to the category of synchronous devices, clocked on input C. There is also an input for data D (Data). In terms of functionality the device belongs to the triggers with the reception of information by one input.
As long as there is a logical one at the clock input, the signal at the output Q repeats the signal at the data input (transparency mode). As soon as the strobe level goes to 0, the level at the output Q remains the same as it was at the moment of the drop (latched). This way you can lock the input level to the input at any point in time. There are also D-triggers that are edge-triggered. They latch the signal on the positive edge of the strobe.
In practice, two types of bistable devices can be combined in one chip. For example, a D and an RS trigger. In this case the Set/Reset inputs are prioritized. If they have a logic zero, then the element behaves like a normal D-trigger. If at least one input has a high level, the output is set to 0 or 1 regardless of the signals on inputs C and D.
The transparency of the D-trigger is not always a useful feature. To avoid this, double elements (flip-flop triggers) are used and are denoted by the letters TT. The first trigger is a normal latch that allows the input signal to go to the output. The second trigger is a memory element. Both are clocked by a single strobe.
T-Triggers
The T Trigger is a countable bistable element. The logic of its work is simple, it changes its state every time the next logical one comes on its input. If a pulse signal is applied to its input, the output frequency will be twice as high as the input frequency. On the inverse output the signal will be antiphased to the direct one.
This is how an asynchronous T-trigger works. There is also a synchronous version. When a pulse signal is applied to the clock input and a logical one is present at pin T, the element behaves in the same way as the asynchronous one - it divides the input frequency in half. If the T pin is a logical zero, the Q output is set to low regardless of the presence of gates.
JK Triggers
This bistable element belongs to the universal category. It can be controlled separately by inputs. The logic of the JK trigger is similar to that of the RS element. The J (Job) input is used to set the output to one. A high level on pin K (Keep) resets the output to zero. The fundamental difference with the RS trigger is that the simultaneous appearance of ones on two control inputs is not forbidden. In this case the output of the element changes its state to the opposite.
If Job and Keep outputs are connected, the JK trigger becomes an asynchronous counting T-trigger. When a meander is applied to the combined input, the output will be half the frequency. As with the RS element, there is a clocked version of the JK trigger. In practice, it is mostly gated elements of this type that are used.
Practical Use
The property of triggers to retain recorded information even when external signals are removed allows them to be used as memory cells with a capacity of 1 bit. A matrix can be built from single elements to store binary states - this is the principle used to construct static random access memories (SRAM). A feature of this memory is its simple circuitry, which does not require additional controllers. Therefore SRAMs are used in controllers and PLCs. But the low write density hampers the use of such matrices in PCs and other powerful computing systems.
The use of triggers as frequency dividers was mentioned above. Bistable elements can be connected into chains to get different division factors. The same chain can be used as a pulse counter. To do this, it is necessary to read from the intermediate elements the state of the outputs at each moment of time - we get a binary code corresponding to the number of pulses that came to the input of the first element.
Depending on the type of used triggers, the counters can be synchronous or asynchronous. The same principle is used for converters of sequential code to parallel code, but only elements that can be gated are used here. Triggers are also used to build digital delay lines and other binary elements.
RS triggers are used as level latches (contact bounce suppressors). If mechanical switches (buttons, switches) are used as logic level sources, the chattering effect will form many signals in place of one when pressed. RS-trigger successfully fights this.
The field of application of bistable devices is wide. The range of tasks that can be solved with their help largely depends on the designer's imagination, especially in the field of non-standard solutions.