Pre-Production
WM8985
NOTCH FILTER WORKED EXAMPLE
The following example illustrates how to calculate the a0 and a1 coefficients for a desired centre
frequency and -3dB bandwidth.
fc = 1000 Hz
fb = 100 Hz
fs = 48000 Hz
= 2π x (1000 / 48000) = 0.1308996939 rads
= 2π x (100 / 48000) = 0.01308996939 rads
w
w
= 2πf / f
c
0
b
s
= 2πf / f
b
s
1− tan(w / 2)
1− tan(0.01308996939/ 2)
1+ tan(0.01308996939 / 2)
b
=
= 0.9869949627
a
=
0
1+ tan(w / 2)
b
a = −(1+ a )cos(w ) = −(1+ 0.9869949627)cos(0.1308996939) = -1.969995945
1
0
0
NFA0 = -a0 x 213 = -8085 (rounded to nearest whole number)
NFA1 = -a1 x 212 = 8069 (rounded to nearest whole number)
These values are then converted to a 14-bit sign / magnitude notation:
NFA0[13] = 1; NFA0[12:0] = 13’h1F95; NFA0 = 14’h3F95 = 14’b11111110010101
NFA1[13] = 0; NFA1[12:0] = 13’h1F85; NFA1 = 14’h1F85 = 14’b01111110000101
DIGITAL ADC VOLUME CONTROL
The output of the ADCs can be digitally attenuated over a range from –127dB to 0dB in 0.5dB steps.
The gain for a given eight-bit code X is given by:
0.5 × (G-255) dB for 1 ≤ G ≤ 255;
MUTE for G = 0
REGISTER
ADDRESS
BIT
LABEL
DEFAULT
DESCRIPTION
R15 (0Fh)
7:0
ADCLVOL
[7:0]
11111111
( 0dB )
Left ADC Digital Volume Control
0000 0000 = Digital Mute
0000 0001 = -127dB
Left channel
ADC Digital
Volume
0000 0010 = -126.5dB
... 0.5dB steps up to
1111 1111 = 0dB
8
ADCVU
Not
latched
ADC left and ADC right volume do not
update until a 1 is written to ADCVU (in
reg 15 or 16)
R16 (10h)
7:0
ADCRVOL
[7:0]
11111111
( 0dB )
Right ADC Digital Volume Control
0000 0000 = Digital Mute
0000 0001 = -127dB
Right channel
ADC Digital
Volume
0000 0010 = -126.5dB
... 0.5dB steps up to
1111 1111 = 0dB
8
ADCVU
Not
latched
ADC left and ADC right volume do not
update until a 1 is written to ADCVU (in
reg 15 or 16)
Table 18 ADC Digital Volume Control
PP, Rev 3.4, October 2006
41
w