CS5464
DS682F3 19
6. SETTING UP THE CS5464
6.1 Clock Divider
The internal clock to the CS5464 needs to operate
around 4 MHz. However, by using the internal clock di-
vider, a higher crystal frequency can be used. This is im-
portant when driving an external microcontroller
requiring a faster clock and using the CPUCLK output.
K is the divide ratio from the crystal input to the internal
clock and is selected with Configuration
register (Con-
fig
) bits K[3:0]. It has a range of 1 to 16. A value of zero
results in a setting of 16.
6.2 CPU Clock Inversion
By default, CPUCLK is inverted from XIN. Setting Con-
figuration
register bit iCPU removes this inversion. This
can be useful when one phase adds more noise to the
system than the other.
6.3 Interrupt Pin Behavior
The behavior of the INT pin is controlled by the IMODE
and IINV bits in the Configuration
register as shown.
If IMODE = 1, the duration of the INT
pulse will be two
DCLK cycles, where DCLK = MCLK/K.
6.4 Current Input Gain Ranges
Control register bits I1gain (I2gain) select the input
range of the current inputs.
6.5 High-pass Filters
Mode Control (Modes) register bits VHPF and IHPF ac-
tivate the HPF in the voltage and current paths, respec-
tively. Each energy channel has separate VHPF and
IHPF bits. When a high-pass filter is enabled in only one
path within a channel, a phase matching filter (PMF) is
applied to the other path within that channel. The PMF
filter matches the amplitude and phase response of the
HPF in the band of interest, but passes DC.
6.6 Cycle Count
Low-rate calculations, such as average power and RMS
voltage and current integrate over several (
N) output
word rate (OWR) samples. The duration of this averag-
ing window is set by the Cycle Count (
N) register. By de-
fault, Cycle Count is set to 4000 (1 second at output
word rate [OWR] of 4000 Hz). The minimum value for
Cycle Count is 10.
6.7 Energy Pulse Outputs
By default, E1 outputs active energy, E3, reactive ener-
gy, and E2
, the sign of both active and reactive energy.
(See Figure 2.
Timing Diagram for E1, E2, and E3 on
page 13.)
Three pairs of bits in the Mode Control (
Modes) register
control the operation of these outputs. These bits are
named E1MODE[1:0], E2MODE[1:0], and
E3MODE[1:0]. Some combinations of these bits over-
ride others, so read the following paragraphs carefully.
The E2
pin can output energy sign, apparent energy, or
energy channel in use (1 or 2). Table 4 lists the func-
tions of E2
as controlled by E2MODE[1:0] in the Modes
register.
Note: E2MODE[1:0]=3 is a special mode.
The E3
pin can output reactive energy, power fail mon-
itor status, voltage sign, or apparent energy. Table 5
IMODE IINV INT Pin
0 0 Active-low Level
0 1 Active-high Level
10 Low Pulse
11 High Pulse
Table 1. Interrupt Configuration
I1gain, I2gain Maximum Input
Gain
250mV10x
1 ±50 mV 50x
Table 2. Current Input Gain Ranges
VHPF IHPF Filter Configuration
0 0 No filter on Voltage or Current
0 1 HPF on Current, PMF on Voltage
1 0 HPF on Voltage, PMF on Current
1 1 HPF on Current and Voltage
Table 3. High-pass Filter Configuration
E2MODE1 E2MODE0 E2
output
0 0 Energy Sign
0 1 Apparent Energy
1 0 Channel in Use
1 1 Enable E1MODE
Table 4. E2 Pin Configuration
CS5464
20 DS682F3
lists the functions of E3 as controlled by E3MODE[1:0]
in the
Modes register when E1MODE is not enabled.
When both E2MODE bits are high, the E1MODE bits
are enabled, allowing active, apparent, reactive, or
wideband reactive energy for
both energy channels to
be output on E1
and E2. Table 6 lists the functions of E1
and E2 with E1MODE enabled.
When E1MODE bits are enabled, the E3
pin outputs ei-
ther the power fail monitor status, or the sign of the E1
and E2 outputs. Table 7 list the functions of the E3 pin
using E3MODE[1:0] in the
Modes register when
E1MODE is enabled
.
6.8 No Load Threshold
The No Load Threshold register (Load
MIN
) is used to
zero out the contents of
E
PULSE
and Q
PULSE
registers if
their magnitude is less than the
Load
MIN
register value.
6.9 Energy Pulse Width
Note: Energy Pulse Width (PulseWidth) only applies to
E1
, E2, or E3 pins that are configured to output pulses.
When any are configured to output steady-state signals,
such as voltage sign, energy channel in use, power fail
monitor, or energy sign, pulse widths and output rates
do not apply.
The pulse width time (t
pw
) in Figure 2, is set by the value
in the
PulseWidth register which is an integer multiple of
the sample or output word rate (OWR).
At OWR of
4000 Hz (a period of 250 uS) t
pw
= PulseWidth x 250uS.
By default,
PulseWidth is set to 1.
6.10 Energy Pulse Rate
The full-scale pulse frequency of enabled E1, E2, E3
pins is the PulseRate x output word rate (OWR)/2. The
actual pulse frequency is the full-scale pulse frequency
multiplied by the pulse register’s (
E
PULSE
, S
PULSE
,
Q
PULSE
) value.
Example:
If the output word rate (OWR) is 4000 Hz, and the
PulseRate is set to 0.05, the full-rate pulse frequency is
0.05 x 4000 / 2 = 100 Hz. If the
E
PULSE
register, driving
E1
, is 0.4567, the pulse output rate on E1 will be
100 Hz x 0.4567 = 45.67 Hz.
6.11 Voltage Sag/Current Fault Detection
Voltage sag detection is used to determine when aver-
aged voltage falls below a predetermined level for a
specified interval of time. Current fault detection deter-
mines when averaged current falls below a predeter-
mined level for a specified interval of time.
The specified interval of time (duration) is set by the val-
ue in the
V1Sag
DUR
(V2Sag
DUR
) and I1Fault
DUR
(I2Fault
DUR
) registers. Setting any of these to zero (de-
fault) disables the detect feature for the given channel.
The value is in output word rate (OWR) samples. The
predetermined level is set by the values in the
V1Sag
LEVEL
(V2Sag
LEVEL
) and I1Fault
LEVEL
(I2Fault
LEVEL
)
registers.
Since the values of
V1 and V2 come from the same in-
put, only one voltage sag detector is necessary.
E3MODE1 E3MODE0 E3 output
0 0 Reactive Energy
0 1 Power Fail Monitor
1 0 Voltage Sign
1 1 Apparent Energy
Table 5. E3 Pin Configuration
E1MODE1 E1MODE0 E1
/ E2 outputs
0 0 Active Energy
0 1 Apparent Energy
1 0 Reactive Energy
1 1 Wideband Reactive
Table 6. E1 / E2 Modes
E3MODE1 E3MODE0 E3
output
0 0 Power Fail Monitor
0 1 Energy Sign
1 0 not used
1 1 not used
Table 7. E3 Pin with E1MODE enabled
CS5464
DS682F3 21
For each enabled input channel, the measured value is
rectified and compared to the associated level register
.
Over the duration window, the number of samples
above and below the level are counted. If the number of
samples below the level exceeds the number of sam-
ples above, a
Status register bit V1
SAG
(V2
SAG
),
I1
FAULT
(I2
FAULT
) is set, indicating a sag or fault condi-
tion. (see Figure 7)..
6.12 Epsilon
The Epsilon register is used to set the gain of the 90°
phase shift used in the quadrature power calculation.
The value in the
Epsilon register is the ratio of the line
frequency to the output word rate (OWR). It is, by de-
fault, 50/4000 (0.0125), for 50 Hz line and 4000 Hz
sample (OWR) frequencies.
For 60 Hz line frequency, it is 60/4000 (0.015). Other
output word rates (OWR) can be used.
Epsilon can also be calculated automatically by the
CS5464 by setting the AFC bit in the Mode Control
(
Modes) register. The Frequency Update bit (FUP) in
the
Status register is set every time the Epsilon register
has been automatically updated.
6.13 Temperature Measurement
The on-chip temperature sensor is designed to mea-
sure temperature and optionally compensate for tem-
perature drift of the voltage reference. It uses the V
BE of
a transistor to determine temperature.
Temperature measurements are stored in the Temper-
ature register (
T) which, by default, is configured to a
range of ±128 degrees on the Celsius (°C) scale.
The application program can change both the scale and
range of Temperature (
T) by changing the Temperature
Gain (
T
GAIN
) and Temperature Offset (T
OFF
) registers.
Two values must be known — the transistor’s
VBE per
degree, and the transistor’s V
BE at 0 degrees. At the
time of this publication, these values are:
VBE (per degree) = 0.2769523 mV/°C or °K
V
BE
0 = 79.2604368 mV at 0°C
To determine the values to write to
T
GAIN
and T
OFF
, use
the following formulae:
T
GAIN
= AD
FS
/ VBE / T
FS
x 2
17
T
OFF
= -V
BE
0 / AD
FS
x 2
23
In the above equations, AD
FS
is the full-scale input
range of the temperature A/D converter or 833.333 mV
and T
FS
is the desired full-scale range of the Tempera-
ture register. The binary exponents are the bit positions
of the binary point of these registers.
To use the Celsius scale (°C) and cover the chip’s op-
erating temperature range of -40°C to +85°C, the Tem-
perature register range needs to be ±128 degrees. T
FS
should be 128 degrees.
T
GAIN
= 833.333 / 0.2769523 / 128 x 131072
= 3081155 (0x2F03C3)
T
OFF
= -79.2604368 / 833.333 x 8388608
= -797862 (0xF3D35A)
These are the actual default values for these registers.
T
GAIN
and T
OFF
can also be used to calibrate the gain
and/or offset of the temperature sensor or A/D convert-
er. (See Section 9.
System Calibration on page 39).
To use the Kelvin (°K) scale, simply add 273 times
VBE / AD
FS
x 2
23
to T
OFF
since 0°C = 273°K,. You will
also need more range. Since -40°C to +85°C is 233°K
to 358°K, a T
FS
of 512 degrees should be used in the
T
GAIN
calculation.
To use the Fahrenheit (°F) scale, multiply
VBE by 5/9
and add 32 times the new
VBE/ AD
FS
x 2
23
to T
OFF
since 0°C = 32°F. You will also want to use aT
FS
of 256
degrees to cover the -40°C to +85°C range.
The Temperature register (
T) updates every 2240 out-
put word rate (OWR) samples. The
Status register bit
TUP indicates when
T is updated.
Figure 7. Sag and Fault Detect

CS5464-ISZ

Mfr. #:
Manufacturer:
Cirrus Logic
Description:
Current & Power Monitors & Regulators 3-Ch Single Phase Power/Energy IC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet