Patent ID: 7913008

Claim:
A method for auto-detection system for communication protocols, the method comprising: transmitting a detection signal to a switching circuit; determining whether the value of a communication mode identification of the detection signal equals zero; and if the value of a communication mode identification of the detection signal equals zero, setting a full-duplex communication between a human-machine interface circuit and a driving device; if the value of a communication mode identification of the detection signal does not equal zero, setting a half-duplex communication between the human-machine interface circuit and the driving device; determining whether the value of a transmission speed identification of the detection signal is an effective value; and if the value of a transmission speed identification of the detection signal is the effective value, initiating auto-detection of a transmission speed of the human-machine interface circuit and setting the detected transmission speed as its transmission speed; determining whether the value of a transmission mode identification of the detection signal equals zero; if the value of a transmission mode identification of the detection signal equals zero, setting its transmission mode as ASCII mode and setting a variable i equals one; setting its communication protocol to be the ith communication protocol of ASCII mode and transmitting a control signal to the driving device; transmitting a feedback signal to the human-machine interface circuit; comparing whether the feedback signal and a default signal are identical; and if the feedback signal and the default signal are not identical, and the transmission mode is ASCII mode, adding one to variable i, and then return to step “setting its communication protocol to be the ith communication protocol of ASCII mode and transmitting a control signal to the driving device;” if the feedback signal and the default signal are identical, detection of the communication protocol of the driving device is complete.