Introduction - If you have any usage issues, please Google them yourself
51 singlechip PWM duty cycle adjustment demonstration program
I spent a little time, write the program, very practical! (through testing, note: AT89S51 MCU MCU P3_7, some need to be changed to P3^7)