View previous topic :: View next topic |
Author |
Message |
wiss1990
Joined: 17 Jun 2013 Posts: 9
|
servo motor code |
Posted: Sat Jul 27, 2013 8:51 am |
|
|
hey all
anyone can give me a pic c code for 16f628a or any other pic to control a servo motor (90° right and 90° left) ?
i tried many codes and i hope someone help me in this |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sat Jul 27, 2013 9:14 am |
|
|
Try using search before asking... what you need is already here if you take the time and effort. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Sat Jul 27, 2013 10:19 am |
|
|
You should say what TYPE of 'servo' motor.
Some think the RC style servo motors are the only ones in the world, but I've got 2HP 'servo' motors with 4000 count encoders on them.
There is code in the examples that CCS supplies.....
cheers
jay |
|
|
wiss1990
Joined: 17 Jun 2013 Posts: 9
|
|
Posted: Sat Jul 27, 2013 4:36 pm |
|
|
thnx
yeah RC servo motor , please can u post a code here (not that code that uses servo.c library). and thnx
ps: i searched so much and i can't find |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9226 Location: Greensville,Ontario
|
|
Posted: Sat Jul 27, 2013 7:16 pm |
|
|
You need to practice using the search option here.
ask for 'rc servo' select 'AND'.
you'll get 313 matches...
good, working code is there, but you'll have to scan the threads to find one that suits your purpose.
hint: 'normal', 'analog' RC servos reponnd to 3 major timings.
1.0 ms 90*left
1.5 ms center
2.0 ms 90*right
of course, depending on make/model this does vary....
hth
jay |
|
|
|