⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 amp2.asm

📁 此源代码用于电力电子变换器的PID调节
💻 ASM
字号:
		.include	"x24x_app.h"      
		.def	AMP2_INIT
		.def	AMP2_MAIN
    ;  	.def	in_theta		;ding yi yi ge jiao du de shu ru
    ;  	.def	ina_amp	,inc_amp ,in_daoshu       ;xu yao chan sheng de zheng xian fu zhi
    ;  	.def	theta_a,theta_b,theta_c ;san ge zi ran huan xiang jiao 
    ;  	.def	out_ta,out_tb,out_tc  ;ding yi san xiang zhan kong bi
	;	.def	theta_a,theta_b,theta_c    
		.ref	SINTAB_360  
		.ref	in_daoshu 
		.ref	in_theta  
		.ref	theta_a
		.ref	theta_b
		.ref	theta_c 
		.ref	amp_period
		.ref	amp_hperiod
		.ref	amp_conv
		.ref	amp_conv1 
		.ref	add_120
		.ref    amp_dizhi 
		.def	alpha 
		.ref	out_a
		.ref	out_b
		.ref	out_c
		.def	out_a_
		.def	out_b_
		.def	out_c_
	
	;	.def		amp_a,amp_b,amp_c
	;	.def    amp_dizhi
	;	.def    AAA
	;	.def    BBB
	;	.def    amp_bili 
	;	.ref	Xin_IIR1
	;	.ref	IIR_BWT41
	;	.ref	Yout_IIR1

alpha        .usect "wave_ge",1
out_a_		 .usect "wave_ge",1
out_b_		.usect "wave_ge",1
out_c_		.usect "wave_ge",1
;in_theta	.usect "wave_ge",1  
;amp_dizhi	.usect "wave_ge",1
;ina_amp		.usect "wave_ge",1 
;inc_amp		.usect "wave_ge",1
;in_daoshu	.usect "wave_ge",1
;theta_a		.usect "wave_ge",1
;theta_b		.usect "wave_ge",1
;theta_c		.usect "wave_ge",1
;out_ta		.usect "wave_ge",1
;out_tb		.usect "wave_ge",1
;out_tc		.usect "wave_ge",1
;add_120		.usect "wave_ge",1   
;amp_period	.usect "wave_ge",1 
;amp_a       .usect "wave_ge",1 
;amp_b		.usect "wave_ge",1 
;amp_c		.usect "wave_ge",1 
;amp_hperiod	.usect "wave_ge",1  
;amp_conv	.usect "wave_ge",1  
;amp_conv1	.usect "wave_ge",1

;amp_bili    .usect "wave_ge",1   
   
AMP2_INIT:	NOP
  			NOP
   			NOP   
		;	LDP		#add_120
   		;	SPLK	#521,add_120 
   		;	SPLK	#1500,amp_hperiod
   		;	SPLK	#3125,amp_period  
   		;	SPLK	#15360,amp_conv  
   		;	SPLK	#2600,amp_conv  ;Q10 biao shi  (2*1500/514)
   		;	SPLK	#17828,amp_dizhi ;Q6 DE (132.5*1.414)V 
   		;	SPLK	#4433,amp_dizhi ;Q6 DE 60V 
   		;    SPLK    #20480,amp_bili   ;Q12 de 5 
   		LDP		#alpha
   		SPLK	#19660,alpha       ;(Q14) 
   		
   		RET
   			
   				
AMP2_MAIN:   
			 

			 SETC	    SXM 
			 SPM		1 
			 LDP		#alpha
			 LT		alpha
			 MPY	out_a 
			 PAC
			 ROL     
			 SACH	out_a_
			 
			 MPY	out_b 
			 PAC
			 ROL     
			 SACH	out_b_
			 
			 MPY	out_c 
			 PAC
			 ROL     
			 SACH	out_c_
			 
			 
			 
     		
 		
	
     		
     		RET
     			
   				
   				
      	
              

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -