- 9
- 0
- 约7.23千字
- 约 7页
- 2019-05-31 发布于浙江
- 举报
经典PID调节,恒温控制。
2009-08-11 20:37#includereg51.h
#includeintrins.h
#includemath.h
#includestring.h
struct PID {
unsigned int SetPoint; // 设定目标 Desired Value
unsigned int Proportion; // 比例常数 Proportional Const
unsigned int Integral; // 积分常数 Integral Const
unsigned int Derivative; // 微分常数 Derivative Const
unsigned int LastError; // Error[-1]
unsigned int PrevError; // Error[-2]
unsigned int SumError; // Sums of Errors
};
struct PID spid; // PID Control Structure
unsigned int rout; // PID Response (Output)
unsigned int rin; // PID Feedback (Input)
sbit data1=P1^0;
sbit clk=P1^1;
sbit plus=P2^0;
sbit
原创力文档

文档评论(0)