I guess this is because the discretization is too coarse. If you use a finer resolution, things will improve. Try e.g.:
state = -1;
xrange = {x, 6.5, 9, .01};
dataSchmitt = Table[{x, schmitt[Sin[x]]}, Evaluate@xrange];
dataSin = Table[{x, Sin[x]}, Evaluate@xrange];
ListLinePlot[{dataSchmitt, dataSin}, GridLines -> {None, {vl, vh}}, PlotRange -> {.5, 1}, AspectRatio -> .2]

ADDENDUM:
As I just found out you do can use Plot - but with the proper options:
state = -1;
Plot[{schmitt[Sin[x]], Sin[x]}, {x, 0, 4 Pi}, MaxRecursion -> 0, PlotPoints -> 200]
Without recursion all data points are evaluated in order.