Abstract:Based-on the new 8-bit microcontroller P89C51RD2 of PHILIPS company,the principal axis rotating speed of friction welding machine is controlled in closed loop by the system. That guarantee the stability of important parameter in friction welding.The design of software and hardware and the principle of the system is introduced detailedly.The output pulse of photo- coder is measured by using catching mode of P89C51RD2' PCA.And the D/A conversion is achieved by PWM pulse wide modulate mode of P89C51RD2' PCA also. With ISP function, the system program can be written or upgraded on-line and with long-distance.The whole circuit formed in module is very concision.The system runs well in practical production.