摘要 |
A method for recognizing an output signal of an encoder switch is provided to recognize a port value inputted from the encoder switch accurately, by judging rotation direction of the encoder switch according to the port value inputted sequentially by the rotation of the encoder switch. In a method for recognizing a port value inputted to a port of a microcomputer according to the rotation of an encoder switch, the rotation direction of the encoder switch is judged according to the port value inputted sequentially by the rotation of the encoder switch, and it is judged whether a specific port value inputted during the rotation of the encoder switch maintains for more than a fixed time(S20). When the specific port value does not maintain for the fixed time, it is judged whether the variation of the inputted port value is inputted as a pre-established error value(S30). When the variation of the inputted port value is inputted as the pre-established error value, a normal port value according to the corresponding rotation direction of the encoder switch is recognized(S40). |