Rs232 pwm controll motors

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
silviodanceclub
Posts: 12
Joined: Tue Oct 30, 2007 11:10 am
Contact:

Rs232 pwm controll motors

Post by silviodanceclub »

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.
Attachments
rs232-controll.fcf
(12.5 KiB) Downloaded 389 times

silviodanceclub
Posts: 12
Joined: Tue Oct 30, 2007 11:10 am
Contact:

Re: Rs232 pwm controll motors

Post by silviodanceclub »

No one who can help me on this ?

User avatar
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

Post by Benj »

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.

User avatar
goldwingers
Posts: 118
Joined: Wed Sep 06, 2006 1:22 pm
Location: London
Been thanked: 1 time
Contact:

Re: Rs232 pwm controll motors

Post by goldwingers »

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

Post Reply