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

📄 fir.asm

📁 在dsp33上用c语言实现的fir滤波(10khz)
💻 ASM
字号:
                .global START
;;;;;;;                .include "h.inc"
                .include "h10k.inc"
;;;;;;;                .include "h10870hz.inc"
                .include "x.inc"  

                .include "vectors.asm" 
                
                .bss  newdata,1
                .bss  lastdata,1
                .bss  receive,1
                .bss  sign,1
                .bss  fix,1 
                .bss  float_u,1     ;32767的浮点数
                
                
                .data
***************Serial Port 0  Register*****************

spgctrl	.set 808040h ; Serial Port 0 global control register
xpctrl 	.set 808042h ; FSX/DX/CLKX port control register
rpctrl 	.set 808043h ; FSR/DR/CLKR port control register
rxtctrl .set 808044h ; r/x timer control register
rxtcnt 	.set 808045h ; r/x timer counter register
rxtprd 	.set 808046h ; r/x period register
xdata 	.set 808048h ; Data transmit register
rdata 	.set 80804Ch ; Data receive register
t0_GO 	.set 001cfh ; Timer configuration to GO
  
reset         .word   0h
sp0_gcfg 	.word 0E280044H; Serial Port 0 global control register initialization
s0_rxtctrl 	.word 0Fh      ; Serial Port 0 R/X TIMER CONTROL INITIALIZATION
s0_rxtprd 	.word 00000013h ; Serial Port 0 R/X TIMER PERIOD INITIALIZATION(12.5MHz CLKX)
;s0_rxtcnt   .word 00000000h ; Serial Port 0 R/X TIMER COUNTER INITIALIZATION
s0_xctrl	.word 0111h 	; SERIAL-PORT TRASMIT PORT CONTROL REG INITIALIZATION
s0_rctrl	.word 0111h 	; SERIAL-PORT RECEIVE PORT CONTROL REG INITIALIZATION 
N             .word   401
x_addr        .word   x1+400
h_addr        .word   hn+400
;out_addr      .word   805000h 
;in_addr       .word   803000h  
STATE		.word 1800h
VOL2048     .word 0800h
xfirst      .word 00d00200h        ; D/A第一个要发的数
fuck        .word 00008000h        ;.word 定义的是定点数 32768 ,ce shi yong
u           .word 00007fffh        ;.word 定义的是定点数 32767 ,给D/A FIX前加的数
DA_CTRL1    .word 00400000h        ; 送往D/A之前,

⌨️ 快捷键说明

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