To improve the automatic detection efficiency of photoelectric encoder, an auto-detection system of photoelectric encoder is designed using DSP (TMS320F2812) as the core device. A 21-bit high accuracy photoelectric encoder is used as the angle standard. It is connected to the detected photoelectric encoder coaxially. They will rotate synchronously under the driving of electric motor. Data acquisition and processing system collects the angular data of the two photoelectric encoders at the same angular position and calculates the angular error of detected photoelectric encoder. Then the data is put into computer. The computer will display the data error. The result of experiment shows that the system could detect encoder whose bit-number below 19, the detecting person could be reduced to one and the detecting speed could be increased to 8~10 times.