Datasheet

AD7760
Rev. A | Page 31 of 36
DOWNLOADING A USER-DEFINED FILTER
As previously mentioned, the filter coefficients are 27 bits in
length—one sign and 26 magnitude bits. Because the AD7760
has a 16-bit parallel bus, the coefficients are padded with 5 MSB
0s to generate a 32-bit word, split into two 16-bit words for
downloading. The first 16-bit word for each coefficient becomes
(00000, sign bit, Magnitude [25:16]), whereas the second word
becomes (Magnitude [15:0]). To ensure that a filter is downloaded
correctly, a checksum must also be generated and then downloaded
following the final coefficient. The checksum is a 16-bit word
generated by splitting each 32-bit word into four bytes and
summing the bytes from all coefficients up to a maximum of
192 bytes (48 coefficients × four bytes). The same checksum
is generated internally in the AD7760 and compared with the
downloaded checksum. The DL_OK bit in the status register is
set if these two checksums agree.
To download a user filter
1.
Write to Control Register 1, setting the DL_FILT bit and
the correct filter length bits corresponding to the length of
the filter to be downloaded (see
Table 11).
2.
Write the first half of the current coefficient data
(00000, sign bit, Magnitude [25:16]). The first coefficient
to be written must be the one adjacent to the point of filter
symmetry.
3.
Write the second half of the current coefficient data
(Magnitude [15:0]).
4.
Repeat Step 2 and Step 3 for each coefficient.
5.
Write the 16-bit checksum.
6.
Use the following methods to verify that the filter coefficients
are downloaded correctly:
a.
Read the status register, checking the DL_OK bit.
b.
Read data and observe the status of the DL_OK bit.
Note that because the user coefficients are stored in RAM, they
are cleared after a
RESET
operation or a loss of power.
Table 11. Filter Length Values
FLEN [3:0] Number of Coefficients Filter Length
0000 Default Default
0001 6 12
0011 12 24
0101 18 36
0111 24 48
1001 30 60
1011 36 72
1101 42 84
1111 48 96
EXAMPLE FILTER DOWNLOAD
The following is an example of downloading a short user-
defined filter with 24 taps. The frequency response is shown in
Figure 58.
10
–80
06
FREQUENCY (kHz)
AMPLITUDE (dB)
00
0
–10
–20
–30
–40
–50
–60
–70
100 200 300 400 500
04975-045
Figure 58. 24-Tap FIR Frequency Response
The coefficients for the filter are listed in Table 12 and are
shown from the center of symmetry outwards. The raw
coefficients were generated using a commercial filter design
tool and were scaled appropriately so that their sum equals
67,108,863 (0x3FF FFFF).
Table 12. 24-Tap FIR Coefficients
Coefficient Raw Scaled
1 0.365481974 53188232
2 0.201339905 29300796
3 0.009636604 1402406
4 −0.075708848 −11017834
5 −0.042856209 −6236822
6 0.019944246 2902466
7 0.036437914 5302774
8 0.007592007 1104856
9 −0.021556583 −3137108
10 −0.024888355 −3621978
11 −0.012379538 −1801582
12 −0.001905756 −277343