Is it possible to achieve 16Khz PWM on the port pins of 89C51? What could be the outlined logic for the code?
It depends on the details of your PWM. (resolution e.g.). What in details do you think of?