FEDL9092-01
OKI Semiconductor
ML9092-01/02/03/04
• Rotary encoder (RE) read
D7
Q4
D6
Q4
D5
Q4
D4
Q4
D3
Q4
D2
Q3
D1
Q2
D0
Q1
The rotary encoder read instruction is used to read the count value from the rotary encoder switch input signal.
(Count values are in the 2’s complement format.)
(1) D7 to D0 (Q4 to Q1) (Count value bit)
The phase difference between the A signal and the B signal is recognized, and the value that is counted by the edge
of the signal with the slower phase is set. Count values range from negative 1000 (Q4, Q3, Q2, Q1) to positive
0111. If the count is less than negative 1000 or more than positive 0111, then it is ignored.
These bits are all reset to “0” when this instruction is executed or when the RESET pin is pulled to a “L” level.
If counterclockwise rotation is input after the count value is incremented by clockwise rotation, then count value
will be decremented. If counterclockwise rotation is further input after the count value reaches 0000, then the
count value will change to 1111 and the count value will be decremented. (The count value will remain 1000 even
if counterclockwise rotation is further input after the count value reaches negative 1000.)
After this, if clockwise rotation is input, then the count value will be incremented. If the count value reaches 1111
and clockwise rotation is further input, then the count value will become 0000 and the count value will be
incremented. (Even if clockwise rotation is further input after the count value reaches positive 0111, the count
value will maintain 0111.)
49/66