handle encoder can be infinitely twist to one or the other side, ie, it has no boundaries. This device is perfectly can replace several buttons which Bashih projects often need to push.
In Incremental encoder 5 conclusions. 2 O button on the findings, conclusions O 3 encoder. Of them - 2 signal and 1 total. He is in the middle.
Wiring encoder :
signal terminals encoder input port to any output of the microcontroller;
The overall conclusion of the encoder is planted on the ground.
To protect against contact bounce is not superfluous to add capacitors.
When the handle is encoder incremental standing still - at the inputs of the microcontroller present logical units. When the handle encoder turn on the conclusions of the microcontroller there are two square-wave signals shifted relative to each other. The direction of rotation of the shaft encoder depends on which of the signals will outperform the other.
There are two popular methods processing encoder strong>: interrupt and compare the previous state of the encoder and the current one.