ADE5166_08 AD [Analog Devices], ADE5166_08 Datasheet - Page 71

no-image

ADE5166_08

Manufacturer Part Number
ADE5166_08
Description
Single-Phase Energy Measurement IC with 8052 MCU, RTC, and LCD Driver
Manufacturer
AD [Analog Devices]
Datasheet
To set up background battery measurements, follow these steps:
1.
2.
Battery ADC in PSM0, PSM1, and PSM2
Depending on the operating mode, a battery conversion is
initiated only by certain actions.
Battery ADC Interrupt
The battery ADC can generate an ADC interrupt when at least
one of the following conditions occurs:
When the battery flag (FBAT, Bit 2) is set in the power manage-
ment interrupt flag SFR (IPSMF, Address 0xF8), a new ADC
value is available in the battery ADC value SFR (BATADC,
Address 0xDF). This battery flag can be enabled as a source of the
PSM interrupt to generate a PSM interrupt every time the battery
drops below a set voltage threshold or after a single conversion
initiated by setting the BATT_ADC_GO bit in the start ADC
measurement SFR (ADCGO, Address 0xD8) is ready.
The battery ADC value SFR (BATADC, Address 0xDF) is updated
with a new value only when the battery flag (FBAT) is set in the
power management interrupt flag SFR (IPSMF, Address 0xF8).
EXTERNAL VOLTAGE MEASUREMENT
The ADE5166/ADE5169 include a dedicated ADC to provide a
digital measurement of an external voltage on the V
8-bit SFR, the V
Configure the battery detection threshold SFR (BATVTH,
Address 0xFA) to establish a low battery threshold. If the
BATADC measurement is below this threshold, the FBAT bit
(Bit 2) in the power management interrupt flag SFR (IPSMF,
Address 0xF8) is set.
Set up the interval for background battery measurements
by configuring the BATT_PERIOD bits in the peripheral
ADC strobe period SFR (STRBPER, Adress 0xF9[3:2]).
In PSM0 operating mode, the 8052 is active. Battery
measurements are available in the background measure-
ment mode and by initiating a single measurement.
In PSM1 operating mode, the 8052 is active, and the part
is battery powered. Single battery measurements can be
initiated by setting the BATT_ADC_GO bit (Bit 0) in the
start ADC measurement SFR (ADCGO, Address 0xD8).
Background battery measurements are not available.
In PSM2 operating mode, the 8052 is not active. Unlike
temperature and V
conversions are not available in this mode.
The new battery ADC value is smaller than the value
set in the battery detection threshold SFR (BATVTH,
Address 0xFA), indicating a battery voltage loss.
A single battery measurement initiated by setting the
BATT_ADC_GO bit in the start ADC measurement SFR
(ADCGO, Address 0xD8) finishes.
DCIN
ADC value SFR (VDCINADC, Address 0xEF),
DCIN
measurements, the battery
DCIN
pin. An
Rev. 0 | Page 71 of 148
holds the results of the conversion. The resolution of the external
voltage measurement is 15.3 mV/LSB. There are two ways to
initiate an external voltage conversion: a single external voltage
measurement or background external voltage measurements.
Single External Voltage Measurement
To obtain an external voltage measurement, set the VDCIN_
ADC_GO bit (Bit 2) in the start ADC measurement SFR
(ADCGO, Address 0xD8). An interrupt is generated when the
conversion is done and when the external voltage measurement
is available in the V
Address 0xEF).
Background External Voltage Measurements
Background external voltage measurements are disabled by
default. To configure the background external voltage measure-
ment mode, set an external voltage measurement interval in the
peripheral ADC strobe period SFR (STRBPER, Address 0xF9).
External voltage measurements are performed periodically in
the background (see Table 49).
When an external voltage conversion is complete, the new
external voltage ADC value is compared to the last external
voltage ADC value that created an interrupt. If the absolute
difference between the two values is greater than the setting in
the VDCIN_DIFF[2:0] bits in the temperature and supply delta
SFR (DIFFPROG, Address 0xF3), a V
V
interrupt flag SFR (IPSMF, Address 0xF8), which is used for power
supply management. This V
generate a PSM interrupt by setting the EVADC bit (Bit 3) in the
power management interrupt enable SFR (IPSME, Address 0xEC).
This method allows external voltage measurements to take
place completely in the background, requiring MCU activity
only if the external voltage has changed more than a confi-
gurable delta.
To set up background external voltage measurements, follow
these steps:
1.
2.
3.
DCIN
Initiate a single external voltage measurement by setting
the VDCIN_ADC_GO bit (Bit 2) in the start ADC
measurement SFR (ADCGO, Address 0xD8).
Upon completion of this measurement, configure the
VDCIN_DIFF bits in the temperature and supply delta SFR
(DIFFPROG, Address 0xF3[2:0]) to establish the change
in voltage that sets the FVDCIN (Bit 0) in the power manage-
ment interrupt flag SFR (IPSMF, Address 0xF8).
Set up the interval for background external voltage measure-
ments by configuring the VDCIN_PERIOD bits in the
peripheral ADC strobe period SFR (STRBPER,
Address 0xF9[5:4]).
ADC flag is FVADC (Bit 3) in the power management
DCIN
ADC value SFR (VDCINADC,
DCIN
ADC flag can be enabled to
ADE5166/ADE5169
DCIN
ADC flag is set. This

Related parts for ADE5166_08