CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

9g servo control algorithm (PIC16F877A)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Khansokhua



Joined: 06 Nov 2021
Posts: 88

View user's profile Send private message

9g servo control algorithm (PIC16F877A)
PostPosted: Tue Dec 06, 2022 8:27 pm     Reply with quote

Hi fellas, greetings.
It's been a while since I corresponded with you on the forum. I wonder how can I control 9 g servo with a PIC mc these days. I bought a Pickit3. I earned a new overlook inside my heart:)))
Respects!!!
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Dec 06, 2022 9:42 pm     Reply with quote

You really need to post WHICH 'servo' you have.
If I assume '9g' is a brand ?? then you mean a typical RC hobby 'servo', then you simply send a repeating pulse train at 50hz, that is between 1 and 2 ms.1ms is full left, 2ms is full right, updated 50 times a second..
at least that was the standard 3 decades ago
there has to be 100s of CCS c code on the web for this, several mfrs sold chips that controlled 8 or 16 servos .
CCS also supplies a basic RC servo program in the 'examples' folder

you can of course use simple delay_us(xxxx); commands for it , or use a timer...

what type of coding depends on what else you want the PIC to do...
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Wed Dec 07, 2022 12:20 am     Reply with quote

9G is a standard term for micro servos. 9 gram. Generally they are
standard servos in terms of driving. The original one was the FS90 and
then the SG90, So your comments are spot on Jay. Also there are quite
a few servo drive codes in the code library.
Khansokhua



Joined: 06 Nov 2021
Posts: 88

View user's profile Send private message

Motor
PostPosted: Wed Dec 07, 2022 6:27 am     Reply with quote

It is SG90. First goal is make a continuous movement 0 to 90 and then 90 to-90 then -90 to 90...
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Dec 07, 2022 3:23 pm     Reply with quote

wow...
https://www.amazon.ca/Miuzei-Helicopter-Airplane-Remote-Control/dp/B07H85M78M

$3 CDN for a servo !!!

link show the time vs location,pretty easy to understand, even for an old dinosaur like me....who has the Signetics 7 channel decoders in a drawer here.
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Thu Dec 08, 2022 7:57 am     Reply with quote

You can even find them cheaper than that.
Some things now are mind blowing in terms of just how little they can be
bought for.
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Dec 08, 2022 9:55 am     Reply with quote

I had to lookup what a 5 wire servo was....
sigh....
motor/drive train and pot....
NO electronics.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group