Part Number:TMS320F28335
F28335 PI控制問題
我為boost pid電路設定了ADC、中斷,
previous_error = 0
integral = 0
start:
error = setpoint – measured_value
integral = integral + error*dt
output = Kp*error + Ki*integral
previous_error = error
wait(dt)
goto start
並預期用PID控制boost output voltage,我在f28335上接了adc A0腳位(如附圖),
並使用可變電阻10k,模擬在AO收到的電壓/100/4095*600(模擬輸入0~600輸出電壓)
目前遇到的問題是CMPA.half.CMPA會額滿
請問我該加上什麼限制條件,當boost output來讓我的pid控制器,能夠控制pwm?
附件為我的代碼,ccs版本為 Version: 6.1.1.00022
Green Deng:
你好,由于国内对wiki等外网的限制,无法查看wiki网页。我建议你直接将问题发送至英文版E2E论坛,那边会有美国工程师为你解答,同时也会有PID方面的专家可以一起讨论问题:https://e2e.ti.com/support/microcontrollers/c2000/f/c2000-microcontrollers-forum
,
Jack:
@green deng
您好,已刪除帖子內包含的國內敏感內容,能否幫忙查看下程式碼內容?
,
Jack:
https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1032794/tms320f28335-pid-control-problem
已將問題發在E2E網,尚未有工程師回覆,謝謝!
,
Green Deng:
好的,已经在你的新帖中回复了:https://e2echina.ti.com/support/microcontrollers/c2000/f/c2000-microcontrollers-forum/208744/tms320f28335-pi