SCHMITT (SX48/52 Only) |
SCHMITT Pin {, Enable}
Function
Configures the internal Schmitt trigger for Pin on the SX48 or SX52. This command does not
apply to the SX18, SX20, or SX28 (use the ST_B and ST_C registers).
Explanation
Every I/O pin in port B through port E can be set to normal or Schmitt-Trigger input. This
can be configured by writing to the appropriate Schmitt-Trigger register (ST_B, ST_C, ST_D
and ST_E). The I/O pins are set to normal input mode by default. Schmitt-Trigger mode can be
activated for all pins, regardless of pin direction but really matter only when the associated
pin is set to input mode. By configuring Schmitt-Trigger mode on input pins, the SX chip can
be less sensitive to minor noise on the input pins. The figure below details the characteristics
of Schmitt-Trigger inputs.
Schmitt Trigger Characteristics |
Schmitt-Trigger inputs are conditioned with a large area of hysteresis. The threshold for a logic 0 is 15% of Vdd and the threshold for a logic 1 is 85% of Vdd. The input pin defaults to an unknown state until the initial voltage crosses a logic 0 or logic 1 boundary. A voltage must cross above 85% of Vdd to be interpreted as a logic 1 and must cross below 15% of Vdd to be interpreted as a logic 0. If the voltage transitions somewhere between the two thresholds, the interpreted logic state remains the same as the previous state.
Start: SCHMITT RB.0, 1 ' enable Schmitt trigger SCHMITT RB.1 ' enable Schmitt trigger SCHMITT RB.2, 0 ' disable Schmitt trigger