Texas Instruments MSP50C6xx Calculator User Manual


 
Special Filter Instructions
4-66
mov STAT,*filterSTAT_tag ;load STAT with last filter
tag status
rpt N2
firk A0,*R0++ ;Do one sample ––> 32 bit result
mov *filterSTAT_tag,STAT ;save STAT with last filter
tag status
;R0 now points to the last
sample
movs *ySampleOut,A0 ;FIR outputs bits 015 in
AC0, 1632 in AC1
mov A0,*nextSample ;Replace last sample with
newest sample and update
mov *R0,A0 ; the start of the
mov *startOfBuff,R0 ; circular buffer to here
(R0)
The set up for the FIRK/CORK instruction is the same as the set up for the FIR/
COR instruction with the exception that the filter coefficients do not need to be
loaded into RAM locations. Rather, they can be included just before speech
data or elsewhere in the program code as follows,
FIRK_COEFFS
include \..\tables\coeffs.dat