Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 845 Bytes

README.md

File metadata and controls

55 lines (40 loc) · 845 Bytes

decfilter

A tool that generates coefficients for the Freescale/NXP decimation filter module

Currently generates a second order bandpass butterworth filter.

Usage

decfilter.py [-graph] [-scale SCALE] sample low high

-graph
    Display frequency response graph

-scale SCALE
    Coefficient scaling, default 8

sample
    Sample frequency

low
    low cutoff frequency

high
    high cutoff frequency

Example

Command

./decfilter.py 50000 3000 4000

Output

Scaled coefficients
0.000452710189366
0.0
-0.000905420378732
0.0
0.000452710189366
0.433214572706
-0.603867529311
0.396311140567
-0.104647706407
Hex coefficients
0x000ED5
0x000000
0xFFE255
0x000000
0x000ED5
0x377392
0xB2B479
0x32BA52
0xF29AE8