I am trying to controll 2 dc motors with the pic16f877.
when i let one motor turn it will work fine but when i let them both run the both motors wont turn, in flowcode it works perfect.
Can someone help me with this ?
Thanx.
Rs232 pwm controll motors
-
- Posts: 12
- Joined: Tue Oct 30, 2007 11:10 am
-
- Posts: 12
- Joined: Tue Oct 30, 2007 11:10 am
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Rs232 pwm controll motors
Hello
If you have the LCD component connected then you can print out the RS232 values to the display to ensure that the values are being received correctly. The program looks ok to me but I cannot test the comms side of things so this could be the cause of the problems. Do you have an LED or something similar that you can drive directly from output CCP2 to test that the motor is not at fault.
If you have the LCD component connected then you can print out the RS232 values to the display to ensure that the values are being received correctly. The program looks ok to me but I cannot test the comms side of things so this could be the cause of the problems. Do you have an LED or something similar that you can drive directly from output CCP2 to test that the motor is not at fault.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- goldwingers
- Posts: 118
- Joined: Wed Sep 06, 2006 1:22 pm
- Location: London
- Been thanked: 1 time
- Contact:
Re: Rs232 pwm controll motors
By the names you have given on your LEDS, I am assuming your trying the pan tilt head route. You have initialised 2 PWM outputs assuming one for pan, one for tilt.. Your program is only showing one PWM(0) output. This may be your problem.
Ian
Ian