Hi,
I am using 89v51rd2 controller to drive a DC motor. I want to generate PWM to control the motor. i want to rotate the motor in clockwise direction for 30 second & then counterclockwise direction for 30 seconds.....i dont want to use inbuilt functionality to produce PWM ....also i have to use SPI protocol for acknowledgment from motor.........plz help me i am beginner in Embedded......plz.....i am having my schematic so i need help for embedded c code only.............