| Electronic Components Datasheet Search |
|
RM0020 Datasheet(PDF) 44 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
RM0020 Datasheet(HTML) 44 Page - STMicroelectronics |
|
44 / 69 page ![]() Function API RM0020 44/69 Algorithm: Equation 36 for each n from 0 to N-1 Note: The filter coefficients must be stored in reversed order. Performance: See Section 7 and Table 53. Example 22. fir_float #include "libdsp2.h" /* #pragma and ALIGN macros used to align to 8 bytes */ #ifdef __ghs__ #pragma alignvar (8) #endif ALIGN_DCC(8) float x[288/*+2*/] ALIGN_MWERKS(8); /* +2 to ensure there are 8 bytes of readable memory behind x */ #ifdef __ghs__ #pragma alignvar (8) #endif ALIGN_DCC(8) float y [256] ALIGN_MWERKS(8); #ifdef __ghs__ #pragma alignvar (8) #endif ALIGN_DCC(8) float hr[33/*+2*/] ALIGN_MWERKS(8) = { /* +2 to ensure there are 8 bytes of readable memory behind hr */ -0.0015288448F,-0.0019041377F,-0.0025120102F,-0.0031517229F,- 0.0033815748F,- 0.0025689987F,0.0000000000F,0.0049703708F,0.0127558533F,0.023399631 1F,0.0364901802F,0.0511553726F,0.0661431077F,0.0799794722F,0.091179 2726F,0.0984722196F,0.1010036179F,0.0984722196F,0.0911792726F,0.079 9794722F,0.0661431077F,0.0511553726F,0.0364901802F,0.0233996311F,0. 0127558533F,0.0049703708F,0.0000000000F,-0.0025689987F,- 0.0033815748F,-0.0031517229F,-0.0025120102F,-0.0019041377F,- 0.0015288448F, }; unsigned short N, ntaps; void main(void) { /* filter the samples in x with FIR filter of 32nd order, */ /* write result into y, hr are filter coefficients stored */ /* in reversed order */ N = 256; yn hk xn k – k0 = ntaps 1 – = |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |