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 CCS Technical Support

PID controller in C 18Fxxxx

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



Joined: 04 Jul 2010
Posts: 3

View user's profile Send private message Send e-mail

PID controller in C 18Fxxxx
PostPosted: Mon Jul 19, 2010 3:02 pm     Reply with quote

Staff,
Does anyone have an example of a PID algorithm in C that I could use ?
I'm using the 18F2480 microcontroller.
Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Tue Jul 20, 2010 8:00 am     Reply with quote

A forum search would find a lot of stuff....
You are not going to find a 'off the shelf' system, since every system of this sort is different, with different coefficients needed, and usually custom connections. A long time ago, I posted the core 'maths' for a PID servo system, using integer arithmetic, in the thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=19703
I have also posted the code for handling a quadrature decoder quickly (assuming this is a motion PID, not something like a heating system....).

Best Wishes
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