| Author |
Message |
zoubir
Joined: 18 Apr 2007 Posts: 9
|
23 Apr 2007 16:39 PID controller using pic f877 |
|
|
|
|
Hi everybody,
I want a clue to calculate the pic 16f877 computation time for the processing of an input sample with the filtering diff equation:eg.
y(n)=0.123*x(n)+0.223*x(n-1)+0.08*x(n-2)+.....
The diff equation I manipulated is order 9 and so there is much time consuming in the pic algorithm which I fear will not work properly for real time processes.
Kind regard,
|
|
| Back to top |
|
 |
Google AdSense

|
23 Apr 2007 16:39 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
melc
Joined: 08 Apr 2005 Posts: 394 Helped: 45
|
23 Apr 2007 20:35 Re: PID controller using pic f877 |
|
|
|
|
| zoubir wrote: |
Hi everybody,
I want a clue to calculate the pic 16f877 computation time for the processing of an input sample with the filtering diff equation:eg.
y(n)=0.123*x(n)+0.223*x(n-1)+0.08*x(n-2)+.....
The diff equation I manipulated is order 9 and so there is much time consuming in the pic algorithm which I fear will not work properly for real time processes.
Kind regard, |
I have no better ideea than measuring the computational time for every constant multiplication on every sample. Limit the number of samples to a reasonable value. Use this trick for multiplication with a constant:
http://www.piclist.com/techref/piclist/codegen/constdivmul.htm
|
|
| Back to top |
|
 |
temitope
Joined: 16 Apr 2007 Posts: 5
|
26 Apr 2007 20:26 PID controller using pic f877 |
|
|
|
|
| zoubir wrote: |
Hi everybody,
I want a clue to calculate the pic 16f877 computation time for the processing of an input sample with the filtering diff equation:eg.
y(n)=0.123*x(n)+0.223*x(n-1)+0.08*x(n-2)+.....
The diff equation I manipulated is order 9 and so there is much time consuming in the pic algorithm which I fear will not work properly for real time processes.
Kind regard, |
hi pal, i know i am just a beginner but i am very sure i have seen something like that in this link. http://www.seattlerobotics.org/encoder/200205/PIDmc.html i hope you it helps. pls anyway to make grow in microcontroller programing and interfacing will be apprciate. cheers
Added after 8 minutes:
here is another for you but this is based on the avr microcontroller
http://hubbard.engr.scu.edu/embedded/motorcontrol/motorctrl-avr/
have fun
|
|
| Back to top |
|
 |