AS8218 / AS8228
Highly Integrated Single Phase 2-Current Energy
Metering Integrated Circuits with Microcontroller, RTC,
Programmable Multi-Purpose I/Os and LCD Driver
DATA SHEET
1. Key Features
-
-
Precision single-phase, one or two current input
energy measurement front-end including Sigma-
Delta modulators for A/D-conversion and digital
signal processor (DSP).
Low current consumption of 5mA, depending on
MCU activity.
Digital phase correction and selectable gain on
both current channels for use with two current
transformers (CT) or one CT and one shunt.
Power-supply monitor (PSM) for power-on reset
and reset when the supply voltage falls below a
defined threshold.
Customer programmable 8-bit 8051 compatible
microcontroller (MCU).
Programmable MCU clock with optional low
power operating conditions.
2 x Universal Asynchronous Receiver /
Transmitters (UART) for external
communications such as programme download
and debugging.
Programmable watchdog timer (WDT) and
external system reset pin.
Real-time clock/calendar (RTC) with on-chip
digital calibration and separate battery supply
pin.
On-chip voltage reference (VREF) with small
temperature coefficient.
Low power 3.0 – 4.0MHz crystal oscillator.
SPI compatible interface for external EEPROM
memory.
Standard on-chip LCD driver (LCDD) interface.
Programmable multi-purpose I/Os (MPIO) with
selectable data direction, pull-up or pull-down
resistors and drive strength.
Mains current lead/lag status indication for
reactive energy measurement.
Low power battery operating mode for meter
reading when Mains voltage is not present.
The AS8218 and AS8228 ICs offer the following
options:
AS8218: 20 x 4 segment LCDD
9 x multi-purpose I/O (MPIO)
AS8228: 24 x 4 segment LCDD
12 x multi-purpose I/O (MPIO)
-
2. General Description
The AS8218 / AS8228 are highly integrated CMOS
single-phase energy metering devices for fully
electronic LCD meter systems. The AS8218 /
AS8228 have been designed to ensure the meters
full compliance with the international Standards
IEC62052 and ANSI.
The AS8218 / AS8228 ICs include all the functions
required for conventional 1 current or 2-current
anti-tamper meters. The functions include precision
energy measurement, an 8-bit microcontroller unit
(MCU), an on-chip Liquid Crystal Display driver
(LCDD), programmable multi-purpose
Inputs/Outputs (MPIO), a real time clock/calendar
(RTC) for complex tariff functions such as time-of-
use or maximum demand billing and a Serial
Peripheral Interface (SPI) for reading data from and
writing data to an external non-volatile memory
(EEPROM).
The AS8218 / AS8228 ICs have a dedicated energy
measurement front-end, which includes an analog
front-end and programmable Digital Signal
Processor (DSP) from which active energy, mains
voltage and mains current are provided. Reactive
and apparent energy can also be calculated.
The on-chip 8-bit 8051 compatible microcontroller
is freely programmable and provides user access to
the various functional blocks. The dedicated
Universal Asynchronous Receiver / Transmitter
(UART1) in the System Control block provides
access to various system functions and blocks. A
second UART (UART2) is also provided, which may
for example be used for debugging. The on-chip
memory includes 24kByte program memory and
1kByte data memory. The meter system designer
can select the size of the external EEPROM
memory from 1kByte to 32kByte (in binary steps).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Revision 3.0, 31-May-06
Page 1 of 123
Data Sheet AS8218 / AS8228
An on-chip programmable watchdog timer (WDT) is
available to automatically initiate a system reset if
a regular ‘hold-off’ signal is not detected.
The system timing and real time clock (RTC) has a
dedicated external battery supply pin (VDD_BAT),
enabling the oscillator and RTC to continue during
‘power-down’. The RTC may be digitally calibrated
for oscillator frequency accuracy.
The LCD Driver (LCDD) block enables the display
of information provided by the microcontroller,
directly to the LCD. Two dedicated data register
banks are provided to simplify programming,
particularly in the case where the display data
needs to be scrolled.
The programmable multi-purpose I/O pins (MPIO)
may be independently configured as inputs or
outputs. All the I/O pins are programmable for data
direction, pull-up/pull-down resistors and drive
strength (4mA/8mA). Typical functions may include
LED energy consumption pulse output, energy
direction and fault condition indication depending
on current 1 or current 2 being active for the
energy calculation, push button for display
scrolling, mains isolation relay control for
prepayment meters, optical interface etc.
An on-chip analog ground buffer (ABUF) and
voltage reference (VREF) ensures that no external
circuitry is required. A power-supply monitor (PSM)
provides a reset, when VDD falls below a safe
operating threshold.
A reset pin (RES_N) is available for external
system reset.
The AS8218 / AS8228 ICs are available in LQFP64
plastic packages.
Revision 3.0, 31-May-06
Page 2 of 123
Data Sheet AS8218 / AS8228
3. Typical Application Circuit
3.3V
3.3V
+
+
LCD
3.3V
XIN XOUT
32
33
Low
Power
Oscillator
VDDA
7
Low
Power
Divider
13
VDDD
22
LBP0
LBP1
LBP2
LBP3
kWh
Vrms
Irms
37 38 39 40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
9
LSD0
LSD1
LSD2
LSD3
LSD4
LSD5
LSD6
LSD7
LSD8
LSD9
LSD10
LSD11
LSD12
LSD13
LSD14
LSD15
LSD16
LSD17
LSD18
LSD19
LSD20
LSD21
LSD22
LSD23
IO0
IO1
IO2
IO3
IO4
IO5
IO6
IO7
IO8
IO9
IO10
IO11
LED
DIRO
FAULT
VDD_BAT 31
RTC
System Timing & RTC
LOAD
I1P
3
Analog Front End
LCD
Driver
SDM
I1N
I2N
4
6
SDM
I2P
VP
5
1
DSP
MCU
SDM
VN
2
I/Os
Examples
only
10
11
WDT
RES_N
34
Multi-
purpose
I/Os
12
15
16
17
18
19
26
27
28
Push-Button
Reference pulses
for calibration
AS8228 only
System
Control
UART1
23
20
24
25
S_N
SI
SO
SC
SPI
8
VSSA
14
VSSD
21
VSSD
29
TXD
30
RXD
EEPROM
S 1
Q
2
3.3V W 3
VSS
4
8 VCC 3.3V
HOLD 3.3V
7
6 C
5 D
VI
VO
3.3V
+
GND
N
L
Figure 1:
Typical application circuit of the AS8218 / AS8228
Revision 3.0, 31-May-06
AS8228 only
Page 3 of 123
Data Sheet AS8218 / AS8228
4. Pin Out
LSD19
LSD18
LSD17
LSD16
LSD15
LSD14
LSD13
LSD12
LSD11
LSD10
LSD23
LSD22
LSD21
LSD20
LSD19
LSD18
LSD17
LSD16
LSD15
LSD14
LSD13
LSD12
LSD11
LSD10
51
LSD9
LSD8
LSD9
50
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
64
63
62
61
60
59
58
57
56
55
54
53
52
VP
VN
I1P
I1N
I2P
I2N
VDDA
VSSA
IO0
IO1
IO2
IO3
VDDD
VSSD
IO4
IO5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
48
47
46
45
44
43
42
LSD7
LSD6
LSD5
LSD4
LSD3
LSD2
LSD1
LSD0
LBP3
LBP2
LBP1
LBP0
n.c.
n.c.
RES_N
XOUT
VP
VN
I1P
I1N
I2P
I2N
VDDA
VSSA
IO0
IO1
IO2
IO3
VDDD
VSSD
IO4
IO5
49
LSD8
48
47
46
45
44
43
42
n.c.
n.c.
n.c.
n.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
LSD7
LSD6
LSD5
LSD4
LSD3
LSD2
LSD1
LSD0
LBP3
LBP2
LBP1
LBP0
n.c.
n.c.
RES_N
XOUT
AS8218
LQFP64
41
40
39
38
37
36
35
34
33
AS8228
LQFP64
41
40
39
38
37
36
35
34
33
VDD_BAT
S_N
SO
VSSD
TXD
VDDD
RXD
XIN
SC
n.c.
SI
IO6
IO7
IO8
IO9
IO6
IO7
IO8
IO10
IO11
VDD_BAT
S_N
SO
VSSD
TXD
5. Pin Description
Pin No.
1
2
3
Pin Name
AS8218
VP
VN
I1P
Pin Name
AS8228
VP
VN
I1P
AI
AI
AI
Positive input for the voltage channel. VP is a differential input with VN.
The typical differential voltage is
±100mV
peak.
Negative input for the voltage channel. VN is a differential input with VP.
Positive input for the first current channel. I1P is a differential input with
I1N. The input gain is programmable depending on the desired current
sensor. The typical differential voltage is
±150mV
peak (Gain = 4).
Negative input for the first current channel. I1N is a differential input with
I1P. The input gain is programmable depending on the desired current
sensor. The typical differential voltage is
±150mV
peak (Gain = 4).
Positive input for the second current channel. I2P is a differential input
with I2N. The input gain is programmable depending on the desired
current sensor. The typical differential voltage is
±150mV
peak
(Gain = 4).
Negative input for the second current channel. I2N is a differential input
with I2P. The input gain is programmable depending on the desired
current sensor. The typical differential voltage is
±150mV
peak
(Gain = 4).
Positive analog supply. VDDA provides the positive supply voltage for
the analog circuitry. The required supply voltage is 3.3V
±10%.
Negative analog supply. VSSA is the ground reference for the analog
circuitry.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Type Description
4
I1N
I1N
AI
5
I2P
I2P
AI
6
I2N
I2N
AI
7
8
9
VDDA
VSSA
IO0
VDDA
VSSA
IO0
S
S
DIO
Revision 3.0, 31-May-06
VDDD
RXD
XIN
n.c.
n.c.
SC
SI
Page 4 of 123
Data Sheet AS8218 / AS8228
Pin No.
10
11
12
13
Pin Name
AS8218
IO1
IO2
IO3
VDDD
Pin Name
AS8228
IO1
IO2
IO3
VDDD
Type Description
DIO
DIO
DIO
S
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Positive digital supply. VDDD provides the positive supply voltage to the
digital circuitry and is internally connected to pin 22. The required supply
voltage is 3.3V
±10%.
Negative digital supply. VSSD is the ground reference for the digital
circuitry.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
14
15
16
17
18
19
20
21
22
VSSD
IO4
IO5
IO6
IO7
IO8
SI
VSSD
VDDD
VSSD
IO4
IO5
IO6
IO7
IO8
SI
VSSD
VDDD
S
DIO
DIO
DIO
DIO
DIO
DIPD Serial peripheral interface (SPI) for external EEPROM: Serial data input.
SI is a digital input with an on-chip pull-down resistor.
S
S
Negative digital supply. VSSD is the ground reference for the digital
circuitry.
Positive digital supply. VDDD provides the positive supply voltage to the
digital circuitry and is internally connected to pin 13. The required supply
voltage is 3.3V
±10%.
Serial peripheral interface (SPI) for external EEPROM: Chip select
(active low).
Serial peripheral interface (SPI) for external EEPROM: Serial data
output
Serial peripheral interface (SPI) for external EEPROM: Serial clock
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Programmable multi-purpose input/output, with selectable pull-up or
pull-down resistors and selectable drive strength.
Universal Asynchronous Receiver/Transmitter (UART1) serial transmit
data output.
23
24
25
26
27
28
29
30
31
32
S_N
SO
SC
n.c.
n.c.
n.c.
TXD
RXD
VDD_BAT
XIN
S_N
SO
SC
IO9
IO10
IO11
TXD
RXD
VDD_BAT
XIN
DO
DO
DO
DIO
DIO
DIO
DO
DIPU Universal Asynchronous Receiver/Transmitter (UART1) serial receive
data input. RXD is a digital input with an on-chip pull-up resistor.
S
AI
Battery backup supply voltage input for the system timing and real time
clock (RTC).
A 3.0 to 4.0MHz crystal may be connected across XIN and XOUT
without the requirement for external load capacitors. Alternatively, an
external clock signal may be applied to XIN.
Revision 3.0, 31-May-06
Page 5 of 123