hello..problem with servo commmand

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

hello..problem with servo commmand

Postby muz » Sat Mar 20, 2010 2:04 am

i'm using sc16a for my current project..the problem is..when i send
CODE: SELECT_ALL_CODE
send_cmd(0x41, 732, 10);
delay(200000);
send_cmd(0x41, 1400,10);

the servo rotates for the 732 angle only and stop.
why the signal cannot be received by sc16a for 1400 angle?
i'm using pic16f877a and 20Mhz crystal and cytron c55r servo and PIC compiler .

tq for your cooperation.
muz
Greenhorn
 
Posts: 3
Joined: Sat Mar 20, 2010 1:50 am

Re: hello..problem with servo commmand

Postby ober » Sat Mar 20, 2010 2:19 pm

So what is the command after:
send_cmd(0x41, 1400,10);
??
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1441
Joined: Wed Apr 15, 2009 1:03 pm

Re: hello..problem with servo commmand

Postby muz » Sun Mar 21, 2010 10:17 am

my servo is now working well for the next command..however it is continuously moving (looping) base on given command although i did not put any while loop..how to stop the servo at the last command?
muz
Greenhorn
 
Posts: 3
Joined: Sat Mar 20, 2010 1:50 am

Re: hello..problem with servo commmand

Postby muz » Sun Mar 21, 2010 1:34 pm

hai..
one more thing.
how to calculate other speed to control the servo instead of speeds stated in sc16a manual page 25.

tq
muz
Greenhorn
 
Posts: 3
Joined: Sat Mar 20, 2010 1:50 am

Re: hello..problem with servo commmand

Postby ober » Sun Mar 21, 2010 4:07 pm

muz WROTE:my servo is now working well for the next command..however it is continuously moving (looping) base on given command although i did not put any while loop..how to stop the servo at the last command?


So what is the previous problem?

The servo keep looping because you do not put any program to stop the microcontroller from RESET. you can put a simple while(1) continue; after the command given.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1441
Joined: Wed Apr 15, 2009 1:03 pm

Re: hello..problem with servo commmand

Postby ober » Sun Mar 21, 2010 4:08 pm

muz WROTE:hai..
one more thing.
how to calculate other speed to control the servo instead of speeds stated in sc16a manual page 25.


What do you mean by that? Please elaborate more.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1441
Joined: Wed Apr 15, 2009 1:03 pm

Re: hello..problem with servo commmand

Postby tkleong1437 » Thu Jun 17, 2010 1:37 am

may be try insert delay after the 1400 command, give some time delay for it process
tkleong1437
Freshie
 
Posts: 7
Joined: Fri May 28, 2010 10:49 pm


Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 12 guests

cron