找传奇、传世资源到传世资源站!

AVR PID Controller

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

from clipboard/*! \brief Demo of PID controller */void main(void){int16_t referenceValue, measurementValue, inputValue;system_init();// Configure Power reduction register to enable the Timer0 module// Atmel START code by default configures PRR to reduce the power consumption.PRR &= ~(1 << PRTIM0);Init();sei();while (1) {// Run PID calculations once every PID timer timeoutif (gFlags.pidTimer == 1) {referenceValue = Get_Reference();measurementValue = Get_Measurement();inputValue = pid_Controller(referenceValue, measurementValue, &pidData);Set_Input(inputValue);gFlags.pidTimer = FALSE;}}}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复