kvrajasekar
New Member
Hi ,
1.I am using 16f72 to implement pid control operation.I can find the error,while reading feedback and input reference value.while calculating PID using error value, pid value becomes 16 bit wide.I am using ccp to generate pwm output.
2.I am using inbuilt ADC port(8-bit) for feedback.But the CCp using pid value is 16 bit wide.Is it possible to send the 16 bit value (or) i have to scale down it to 8 -bit? before sending to ccp.
I used the followin formula to find PID:
Proportional term:
P=Kp*Error
Integral term:
I=acc+Ki*error
acc=accumulative error
Differential term:
D=Kd*(Eprevious-Epresent)
Please help me on this...
regards,
Raja.
1.I am using 16f72 to implement pid control operation.I can find the error,while reading feedback and input reference value.while calculating PID using error value, pid value becomes 16 bit wide.I am using ccp to generate pwm output.
2.I am using inbuilt ADC port(8-bit) for feedback.But the CCp using pid value is 16 bit wide.Is it possible to send the 16 bit value (or) i have to scale down it to 8 -bit? before sending to ccp.
I used the followin formula to find PID:
Proportional term:
P=Kp*Error
Integral term:
I=acc+Ki*error
acc=accumulative error
Differential term:
D=Kd*(Eprevious-Epresent)
Please help me on this...
regards,
Raja.