To improve the reliability of controller of a microcomputer, a fault-tolerant system which is consisted of two ones was proposed. In this system, output of a microcomputer was transmitted into another microcomputer through the serial ports, it was compared with the pre-stored data to carry out the diagnosis each other. The address encode technique was employed to implement the automatic switchover between two microcomputers and to insulate the fault unit diagnosed. After the fault unit was repaired and returned to the system(plug and play an electronic unit on-line), it waited through testing the task number of system program until the first command of next task was detached for synchronous. Experiment result shows that the controller can detect the fault in real time, and the failure device can be displaced without powering off.