i want to use pin 8 & 9 of 89c2051 as two inputs. and according to these i want to generate pwm out at pin 19. actully when signal comes at pin 8 it should generate an increasing pwm and when signal comes at pin 9 it should generate decreasing pwm at pin 19 to decrease the motor speed. and the code should be in C++. plz help me as soon as possible.
I think if u post ur query in Microcontroller blog then might be u get more replies. Anyway u can use timer and run it in 16bit mode.
when u detect signal on pin8 u start decreasing the count and as soon u detect signal on Pin9 then u start increase the timer count in this way u can implement ur PWM .