WM8985
Pre-Production
PROGRAMMABLE NOTCH FILTER
A programmable notch filter is provided. This filter has a variable centre frequency and bandwidth,
programmable via two coefficients, a0 and a1. a0 and a1 are represented by the register bits
NFA0[13:0] and NFA1[13:0]. Because these coefficient values require four register writes to setup
there is an NFU (Notch Filter Update) flag which should be set only when all four registers are setup.
REGISTER
ADDRESS
BIT
LABEL
DEFAULT
DESCRIPTION
R27 (1Bh)
0
0
6:0
NFA0[13:7]
NFEN
Notch Filter a0 coefficient, bits [13:7]
Notch filter enable:
Notch Filter 1
7
8
0 = Disabled
1 = Enabled
0
NFU
Notch filter update. The notch filter
values used internally only update
when one of the NFU bits is set high.
Notch Filter a0 coefficient, bits [6:0]
Notch filter update. The notch filter
values used internally only update
when one of the NFU bits is set high.
Notch Filter a1 coefficient, bits [13:7]
Notch filter update. The notch filter
values used internally only update
when one of the NFU bits is set high.
Notch Filter a1 coefficient, bits [6:0]
Notch filter update. The notch filter
values used internally only update
when one of the NFU bits is set high.
R28 (1Ch)
0
0
6:0
8
NFA0[6:0]
NFU
Notch Filter 2
R29 (1Dh)
0
0
6:0
8
NFA1[13:7]
NFU
Notch Filter 3
R30 (1Eh)
0
0
0-6
8
NFA1[6:0]
NFU
Notch Filter 4
Table 17 Notch Filter Function
The coefficients are calculated as follows:
1− tan(w / 2)
b
a
=
0
1+ tan(w / 2)
b
a = −(1+ a )cos(w )
1
0
0
Where:
w
w
= 2πf / f
c
0
b
s
= 2πf / f
b
s
fc = centre frequency in Hz, fb = -3dB bandwidth in Hz, fs = sample frequency in Hz
The actual register values can be determined from the coefficients as follows:
NFA0 = -a0 x 213
NFA1 = -a1 x 212
PP, Rev 3.4, October 2006
w
40