I. Program Modules
(Continued)
FILTER PROGRAMMING MODULE
The example filter programming module is shown in
.
Load Filter Parameters (Coefficients)
An LFIL (Load FILter) command sequence includes com-
mand LFIL, a filter control word, and a variable number of
data words.
The LFIL command initiates loading filter coefficients into
input buffers.
The two data bytes, written immediately after LFIL, comprise
the filter control word. The first byte programs the derivative
sampling coefficient, d
s
(i.e. selects the derivative sampling
interval). The second byte indicates, with logical ones in
respective bit positions, which of the remaining four filter
coefficients will be loaded. See
,
. Any com-
bination of the four coefficients can be loaded within a single
LFIL command sequence.
Immediately following the filter control word, the filter coeffi-
cients are written. Each coefficient is written as a pair of data
bytes, a data word. Because any combination of the four
coefficients can be loaded within a single LFIL command
sequence, the number of data words following the filter
control word can vary in the range from zero to four.
In the case of the example module, the first byte of the filter
control word, 00 hex, programs a derivative sampling coef-
ficient of one. The second byte, x8 hex, indicates only the
proportional gain coefficient will be loaded.
Immediately following the filter control word, the proportional
gain coefficent is written. In this example, k
p
is set to ten with
the data word 000A hex. The other three filter coefficients
remain at zero, their reset value.
Update Filter
The update filter command, UDF, transfers new filter coeffi-
cients from input buffers to working registers. Until UDF is
executed, the new filter coefficients do not affect the transfer
characteristic of the filter.
01086009
FIGURE 7. LM628 — Simplified Block Diagram Form
AN-693
www.national.com
5