Tham khảo tài liệu 'giáo trình hình thành hệ thống ứng dụng mạch chuyển trong động cơ không đồng bộ roto p8', kỹ thuật - công nghệ, điện - điện tử phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | P2_0 1 P2_1 1 k TL1 0xF6 TH1 0xFF TR1 1 else if k 2 P2_2 0 P2_3 0 k TL1 speed 0xFF TH1 speed 8 TR1 1 else k 0 P2_2 1 P2_3 1 TL1 0xF6 TH1 0xFF TR1 1 float R void error_spe_current setspe-n 71 total_error_current total_error_past error_spe_current P Kp error_spe_curr ent I Kp total_error_curr ent T i D Kp Td error_spe_current - error_spe_past Uk P I D total_error_past total_error_current error_spe_past error_spe_current return Uk int Cospeed void int cospe R cospe setspe 81 - int Uk if cospe 4608 cospe 4608 else if cospe 23040 cospe 23040 else _nop_ speed -cospe return speed void kiemtra_1s void if m 20 m 0 Cospeed 72 else _nop_ void main void TMOD 0x11 IE 0x89 TF0 1 TF1 1 while 1 kiemtra_1s .