View previous topic :: View next topic |
Author |
Message |
MAKInnovation
Joined: 16 Nov 2010 Posts: 61
|
servo code |
Posted: Fri Feb 07, 2014 4:53 am |
|
|
Dear PCM programmer;
I am using one of your servo code in my project. link is given below:
http://www.ccsinfo.com/forum/viewtopic.php?t=44328&highlight=
now i have added some more task in my code like clocking, thermo couple reading, frequency reading etc.
when i use "while(!pulse_done_flag);" code of line, the code is become slow. i think it stuck more of the time in reading while loop.
So i made some changes, which is pasted below:
if(!pulse_done_flag); // Wait until pulse is done
{
pulse_done_flag = FALSE;
disable_interrupts(INT_TIMER1);
pulse_high_duration = pulse_high_duration1+PULSE_1MS;
enable_interrupts(INT_TIMER1);
}
With this change, every thing is working normal except the little noise in servo motor. although it does not change its required postion but it jitters some time.
What could be done to make it ok
Regards;
Ashraf |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Feb 07, 2014 1:54 pm |
|
|
You should not address a post to me directly if you can help it.
Your problem can be looked at by anyone. I might be busy or going out,
such as right now. |
|
|
MAKInnovation
Joined: 16 Nov 2010 Posts: 61
|
|
Posted: Sun Feb 09, 2014 10:52 pm |
|
|
Ok |
|
|
MAKInnovation
Joined: 16 Nov 2010 Posts: 61
|
|
Posted: Sun Feb 09, 2014 11:20 pm |
|
|
Sir; I will be care full next time. Thank you for your kind support
Can any one else help me with the servo code?
Ashraf |
|
|
|