For a 180 degree RC servo.. extreme 90 degrees is 1mS pulse width.. In the other direction -90 degrees is 2mS, wit 1.5mS in the center....
Oh!! yeah sorry..... If you make the delay routines yourself (As I have done ) you can pass a variable to the delay function..
If you create a delayUs() that excepts a long then you can add you ADC result to 1000.
So if your pot is tracked to one side the ADC will be zero (1000) .... If your pot is mid-way (512) the servo will go center ( 1512 ) and if the pot was at max you'll get (2024).
how you calculated its 5?? for 8Mhz you were doing x/=7?
and you didn't answer how to calculate freq as we ere adding 20ms delay for 50hz but inst fetching will also take some time so, there is no need of calculating it?
Maybe if it would be possible to personally block all posts from India. about 35% of traffick to ETO comes from india these days. And I think well over half of new members are from India that post one question.. seeking for help for homework or their actual job. I can't tolerate that much longer. This used to be more professional forum.. now it is a helpdesk for Indian students. (Actually Ritesh claims to have a degree in engineerin. And he is trying to run his own business as far as I know.. and he comes here to ask us to do all the designing and coding.)
Maybe if it would be possible to personally block all posts from India. about 35% of traffick to ETO comes from india these days. And I think well over half of new members are from India that post one question.. seeking for help for homework or their actual job. I can't tolerate that much longer. This used to be more professional forum.. now it is a helpdesk for Indian students. (Actually Ritesh claims to have a degree in engineerin.)
Maybe if it would be possible to personally block all posts from India. about 35% of traffick to ETO comes from india these days. And I think well over half of new members are from India that post one question.. seeking for help for homework or their actual job. I can't tolerate that much longer. This used to be more professional forum.. now it is a helpdesk for Indian students. (Actually Ritesh claims to have a degree in engineerin. And he is trying to run his own business as far as I know.. and he comes here to ask us to do all the designing and coding.)
This problem is not inherent in India. Many of the nations in Asia have the same problem. We are using a lot of the classic old "British System" education and still adhering to that.
Maybe if it would be possible to personally block all posts from India. about 35% of traffick to ETO comes from india these days. And I think well over half of new members are from India that post one question.. seeking for help for homework or their actual job. I can't tolerate that much longer. This used to be more professional forum.. now it is a helpdesk for Indian students. (Actually Ritesh claims to have a degree in engineerin. And he is trying to run his own business as far as I know.. and he comes here to ask us to do all the designing and coding.)
Learn. Stop being lazy. You come here asking same questions again and again. You don't bother to explain the project and the problem properly. You do not draw any schematics, you copy-paste most of your code. It is so frustrating to try to help you when you do not put any real effort to your projects.
Please help to clarify that. With respect to using 1.9 KHz were Ian Rogers and misterT referring to "modern" industrial servos, "modern" model servos that work at that frequency (if so, please give a brand and model number), or something else?
Well, "industrial" is a bit overstatement. But, a modern servo is a digital servo. What Ritesh has is a "traditional" analog servo. Digital servos are more accurate and faster. I would stick to the standard 50 Hz control signal with analog servos. I don't know the "speed limits" of either servo. Looks like 300 Hz is standard for digital servos.
If you create a delayUs() that excepts a long then you can add you ADC result to 1000.
So if your pot is tracked to one side the ADC will be zero (1000) .... If your pot is mid-way (512) the servo will go center ( 1512 ) and if the pot was at max you'll get (2024).