Cs5378 – Cirrus Logic CS5378 User Manual

Page 34

Advertising
background image

CS5378

DS639F3

34

Write FIR Coefficients - 0x03

This command writes custom coefficients for the
FIR1 and FIR2 filters. The first two data words set
the number of FIR1 and FIR2 coefficients to be
written. The remaining data words are the concate-
nated FIR1 and FIR2 coefficients.

A maximum of 255 coefficients can be written for
each FIR filter, though the available digital filter
computation cycles will limit their practical size.
See “FIR Filter” on page 44 for more information
about FIR filter coefficients.

Sample Command:

Write FIR1 coefficients 0x00022E, 0x000771 then
FIR2 coefficients 0xFFFFB9, 0xFFFE8D.

02 03 00 00 03 00 00 02 00 00 02

Delay 1 ms or poll E2DREQ

02 06 00 02 2E 00 07 71

Delay 1 ms or poll E2DREQ

02 06 FF FF B9 FF FE 8D

Delay 1 ms or poll E2DREQ

Write IIR Coefficients - 0x04

This command writes custom coefficients for the
two stage IIR filter. The IIR architecture and num-
ber of coefficients is fixed, so eight coefficient val-
ues immediately follow this command. The IIR
coefficient write order is: a11, b10, b11, a21, a22,
b20, b21, and b22. See “IIR Filter” on page 52 for
more information about IIR filter coefficients.

Sample Command:

Write IIR1 coefficients 0x84BC9D, 0x7DA1B1,
0x825E4F, and IIR2 coefficients 0x83694F,
0x3CAD5F, 0x3E5104, 0x835DF8, 0x3E5104.

02 03 00 00 04 84 BC 9D 7D A1 B1

Delay 1 ms or poll E2DREQ

02 06 82 5E 4F 83 69 4F

Delay 1 ms or poll E2DREQ

02 06 3C AD 5F 3E 51 04

Delay 1 ms or poll E2DREQ

02 06 83 5D F8 3E 51 04

Delay 1 ms or poll E2DREQ

Write ROM Coefficients - 0x05

This configuration command selects the on-chip
coefficients for FIR1, FIR2, IIR 1st order, and IIR
2nd order filters for use by the digital filter. One
data word is required to select which internal coef-
ficient sets to use. See “Filter Coefficient Selec-
tion” on page 38 for inform
ation about selecting
on-chip FIR and IIR coefficient sets.

Sample Command:

Select IIR1 and IIR2 3 Hz @ 500 SPS low-cut co-
efficients, with FIR1 and FIR2 linear phase high-
cut coefficients. Data word 0x002200.

02 03 00 00 05 00 22 00

Delay 1 ms or poll E2DREQ

Filter Start - 0x08

This command initializes and starts the digital fil-
ter. Measurement data becomes available one full
sample period after this command is issued. No
data words are required for this command.

Sample Command:

02 03 00 00 08

Delay 1 ms or poll E2DREQ

Filter Stop - 0x09

This command disables the digital filter. Measure-
ment data output stops immediately after this com-
mand is issued. No data words are required for this
command.

Sample Command:

02 03 00 00 09

Delay 1 ms or poll E2DREQ

Advertising