3-2 三相交流电动机SVPWM开环调速控制程序_第1页
3-2 三相交流电动机SVPWM开环调速控制程序_第2页
3-2 三相交流电动机SVPWM开环调速控制程序_第3页
3-2 三相交流电动机SVPWM开环调速控制程序_第4页
3-2 三相交流电动机SVPWM开环调速控制程序_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

三相交流电动机 SVPWM 开环调速控制程序 equ 30F6010 1 include C Program Files Microchip MPLAB ASM30 Suite Support inc p30f6010 inc global reset global PWMInterrupt global DefaultInterrupt config FOSC CSW FSCM OFF mov 3 w1 mov theta 90 w2 ww tblrdl w0 w2 dec w1 w1 btss w1 15 goto ww mov 29335 w0 mov w0 theta i mov 31291 w0 mov w0 theta s main loop mov f omega w0 mov set f w4 mul uu w4 w0 w2 mov w3 omega mov max v w0 mul uu w4 w0 w2 mov w3 set v bra main loop PWMInterrupt push d W0 push d W2 push d W4 push d W6 mov omega w0 mov t sample w4 mul uu w4 w0 w2 lac w2 A sftac a 16 push ACCAL lac w3 A clr ACCAU pop ACCAL sftac a 1 mov theta h w0 add w0 a mov theta l w1 lac w1 b sftac b 16 clr ACCBH clr ACCBU add a sac a w0 mov w0 theta h push ACCAH push ACCAL sftac a 16 clr ACCAU sac a w0 mov w0 theta l pop ACCAL pop ACCAH btss ACCAH 15 goto chk uplim mov theta 360 w0 add w0 a sac a w0 mov w0 theta h bra rnd theta chk uplim mov theta 360 w0 lac w0 b sub a btsc ACCAH 15 goto rest theta sac a w0 mov w0 theta h goto rnd theta rest theta add a rnd theta mov 1 w0 lac w0 b sftac b 1 add a sac a w0 mov w0 theta r mov 1 w0 mov w0 ss mov w0 sc mov theta r w0 mov w0 theta m mov theta 90 w2 sub w2 w0 w6 btss w6 15 goto e q mov 1 w2 mov w2 sc mov theta 180 w2 mov theta r w0 sub w2 w0 w6 mov w6 theta m btss w6 15 goto e q mov 1 w2 mov w2 ss mov theta r w2 mov theta 180 w0 sub w2 w0 w6 mov w6 theta m mov theta 270 w2 mov theta r w0 sub w2 w0 w6 btss w6 15 goto e q mov 1 w2 mov w2 sc mov theta 360 w2 mov theta r w0 sub w2 w0 w6 mov w6 theta m e q mov theta m w0 mov theta i w4 mul UU W4 W0 W2 lac w2 A sftac a 16 push ACCAL lac w3 A clr ACCAU pop ACCAL sftac a 5 sac a w0 mov w0 sin indx mov tblpage sin entry W0 mov W0 TBLPAG mov tbloffset sin entry W0 mov sin indx w1 sl W1 1 W1 add w0 w1 w2 tblrdl W2 w5 mov w5 sin theta mov 180 w4 add w0 w4 w2 sub w2 w1 w6 tblrdl W6 w5 mov w5 cos theta mov ss w4 mov sin theta w5 mpy W4 W5 A sftac a 16 sac a 0 w0 mov w0 sin theta mov sc w4 mov cos theta w5 mpy W4 W5 A sftac a 16 sac a 0 w0 mov w0 cos theta mov set v w4 mov cos theta w5 mpy W4 W5 A sac a w0 mov w0 ua mov sin theta w5 mpy W4 W5 A sac a w0 mov w0 ub mov theta r w0 mov theta s w4 mul UU W4 W0 W2 lac w2 A sftac a 16 push ACCAL lac w3 A clr ACCAU pop ACCAL sftac a 11 sac a w0 mov w0 sector mov tblpage dec ms W0 mov W0 TBLPAG mov tbloffset dec ms W0 mov sector w1 sl W1 3 W1 add w0 w1 w2 tblrdl W2 w5 mov ua w4 mpy W4 W5 A add w2 2 w2 tblrdl W2 w5 mov ub w4 mpy W4 W5 B add a 0 5 C1 Q26 btsc ACCAH 15 clr a cmp1big0 sac a w0 mov w0 temp mov t1 period w4 mul UU W4 W0 W6 lac w6 A sftac a 16 push ACCAL lac w7 A clr ACCAU pop ACCAL sftac a 1 sac r a w0 mov w0 cmp 1 add w2 2 w2 tblrdl W2 w5 mov ua w4 mpy W4 W5 A add w2 2 w2 tblrdl W2 w5 mov ub w4 mpy W4 W5 B add a btsc ACCAH 15 clr a cmp2big0 sac a w0 mov w0 temp mov t1 period w4 mul UU W4 W0 W2 lac w2 A sftac a 16 push ACCAL lac w3 A clr ACCAU pop ACCAL sftac a 1 sac r a w0 mov w0 cmp 2 mov 183 w2 mov cmp 1 w0 sub w2 w0 w6 mov cmp 2 w1 sub w6 w1 w2 btsc ACCAH 15 clr w2 cmp0big0 asr w2 1 w0 mov w0 cmp 0 mov tblpage first W0 mov W0 TBLPAG mov tbloffset first W0 mov sector w1 sl w1 1 w1 add w0 w1 w2 tblrdl W2 w5 mov w5 first tog mov 183 w3 mov cmp 0 w4 sub w3 w4 w6 sl w6 1 w6 mov w6 w5 mov tblpage second W0 mov W0 TBLPAG mov tbloffset second W0 mov sector w1 sl w1 1 w1 add w0 w1 w2 tblrdl W2 w5 mov w5 sec tog mov cmp 0 w0 mov cmp 1 w2 add w0 w2 w3 mov 183 w0 sub w0 w3 w0 sl w0 1 w0 mov w0 w5 mov PDC3 w2 mov first tog w4 mov PDC1 w5 mov PDC2 w1 mov sec tog w3 sub w2 w4 w6 add w6 w1 w7 sub w7 w3 w8 add w8 w5 w9 mov w9 w10 mov w10 temp mov cmp 0 w0 mov cmp 1 w1 add w0 w1 w3 mov cmp 2 w2 add w3 w2 w4 mov 183 w0 sub w0 w4 w0 sl W0 1 W0 mov w0 w10 pop d W6 pop d W4 pop d W2 pop d W0 bclr IFS2 7 bset PTCON PTEN retfie DefaultInterrupt bclr TRISA 9 bset PORTA 9 nop nop nop retfie wreg init clr W0 mov W0 W14 repeat 12 mov W0 W14 clr W14 return section sin entry code section angles code section first code section dec ms code section second code palign 2 sin entry hword 0 hword 286 572 857 1143 1428 hword 1713 1997 2280 2563 2845 hword 3126 3406 3686 3964 4240 hword 4516 4790 5063 5334 5604 hword 5872 6138 6402 6664 6924 hword 7182 7438 7692 7943 8192 hword 8438 8682 8932 9162 9397 hword 9630 9860 10087 10311 10531 hword 10749 10963 11174 11381 11585 hword 11786 11982 12176 12365 12551 hword 12733 12911 13085 13255 13421 hword 13583 13741 13894 14044 14189 hword 14330 14466 14598 14726 14849 hword 14968 15082 15191 15296 15396 hword 15491 15582 15668 15749 15826 hword 15897 15964 16026 16083 16135 hword 16182 16225 16262 16294 16322 hword 16344 16362 16374 16382 16384 angles hword 0 x1922 hword 0 x3244 hword 0 x4b66 hword 0 x6488 dec ms hword 20066 hword 11585 hword 0 hword 23170 hword 20066 hword 11585 hword 20066 hword 11585 hword 0 hword 23170 hword 20066 hword 11585 hword 0 hword 23170 hword 20

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论