Hi guys!

Well! im a novice in robotics. IM making a robot which will be having two wheels in the differential drive formation. That is each wheel will be connected with one motor. So there will be two motors in total.

Now Im using PIC16F84A. I want to use the PWM command in order to control both the motors. Now the thing is that what is the way to programe this sort of scenario. I mean, just see, we have got two DC motors, each should be controlled independently. SO we will be needing two PWM commands to be operated simultaneously. Since both motors are somewhat different in practical, so different duty cycles would be required. So how would i program that???

I have seen that when i write PWM command, it first executes it completely and then comes to next command. SO how can i control the other motor with PWM simultaneously??

PLease provide some example code to control two motors simultaenously using PWM commands. Or if it is not possible then how can we control two wheel differential drive?

Thanks in advance!

Take carez!

Good Bye!