| Electronic Components Datasheet Search |
|
AN540 Datasheet(PDF) 4 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
AN540 Datasheet(HTML) 4 Page - Microchip Technology |
|
4 / 17 page ![]() DS00540B-page 4 © 1993 Microchip Technology Inc. Implementing IIR Digital Filters APPENDIX A: IIR.LST MPASM B0.54 PAGE 1 Digital IIR Filter Using PIC17C42 TITLE “Digital IIR Filter Using PIC17C42” LIST P=17C42, C=120, T=ON, R=DEC, N=0 ; include “17c42.h” ; include “17c42.mac” ; include “17c42iir.mac” ;******************************************************************* ; PIC17C42 MACRO ; ; Macro For A Bi-Quad IIR Filter ; 2nd order Direct Form (Transposed) Type ; ; Filter co-efficients B0 & B2 are assumed equal ; ; The difference equations for each cascade section is given by : ; Y(n) = B0*D(n) + B1*D(n-1) + B2*D(n-2) ; D(n) = X(n) - A1*D(n-1) - A2*D(n-2) ; where X(n) = input sample, Y(n) = output of filter ; and A1, A2, B0, B1, B2 are the Filter Co-efficients ; ; The above difference equations are only for 1 section of a ; 2nd order Direct_Form II Filter structure (IIR) ; ; NOTE : ; It is possible to design the above structures ; such that the co-efficients B0 = B2. If this is the ; case, ; Y(n) = B0*[D(n) + D(n-2)] = B2*[D(n) + D(n-2)] ; This way, one multiplication can be avoided ; ; If a 4th order filter is to be implemented, the output of ; the 1st structure should be input to the 2nd cascade section ; ; Timing (WORST CASE) : ; 59+4*179 = 775 Cycles ; (194 uS @ 16 Mhz) ; Program Memory : ; 63 locations ; ;******************************************************************* ; The sample filters are desined so that B0=B2 ; This saves 1 multiplication ; 0001 B0_EQUALS_B2 equ TRUE ; ;******************************************************************* ; Parameters to BIQUAD Macro : ; Filter Constants A1, A2, B0, B1, B2 ; & D(n), D(n-1), D(n-2), filter stage # ; BIQUAD MACRO Ax1,Ax2,Bx0,Bx1,Dn,Dn_1,Dn_2,stage ; ; Compute Ax2*D(n-2) 4-132 |
|
|
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 |