14 communication between mpu and ce, 15 timing control, Communication between mpu and ce – Maxim Integrated 71M6534 Energy Meter IC Family Software User Manual

Page 80: Timing control

Advertising
background image

71M653X Software User’s Guide

acknowledge is supposed to occur when the message was garbled, but in this case has the effect of delaying the read
command until the copy is complete and a stable copy of the meter data is available for use by the protocol.

When the AMR system logs-off, or the AMR interface times out, the flags are reset to mark the stable copy invalid.

5.14.1.14 Communication between MPU and CE

The communication between CE and MPU has evolved since early versions. The current best practice is to divide the
CE’s data into four parts.

1. Configuration data set by the MPU, and read by the CE. This includes gains and other static adjustments.

2. Constant data needed by the CE, and never adjusted by the MPU. The MPU simply sets it. It could be fixed,

stored in the CE’s program code, but isn’t.

3. Data read and written by both CE and MPU. These usually begin execution as constant values. This includes

pulse input values set by the MPU, which can alternatively be set by the CE’s native code, and the main gain
adjustment for making the meter run at different speed in different temperatures.

4. Data written by the CE, and initialized by the MPU to zero. This includes all of the CE’s output values.

Parts 1, 2, and 3 are set to defaults from a table of constants in the MPU’s code area.

Part 1 is saved and restored as part of the EEPROM configuration, as an overlay of the constants.

Part 4 is cleared to zero by the MPU, to permit the table of constants to be as small as possible.

In the 6530, unlike earlier versions, reading and writing the CE is transparent because the CE and MPU share the
RAM. No copy is necessary, which saves both MPU time, and RAM. The destination table and CE was moved to start
of RAM location zero. The CE’s output data was moved to location 0x0200, so that PDATA can still be used to access
it quickly.

5.14.1.15 Timing Control

The chip has two high-speed timers. It also has an electronic clock. Further, there is a timer to wake the chip from its
low power modes. The demo code has facilities to demonstrate all of these.

5.14.1.16 6531: Calculation of max(VA*IA, VA*IB) Option, Equation 0

The global flow of Wh calculation is an important optimization, and will be selected by compile flag:

Vrms_A = sqrt(v0sqsum) from the CE.

Irms_A = sqrt(i0sqsum) from the CE.

Irms_B = sqrt(i1sqsum) from the CE.

Volts and Current are now available for all elements.

Figure Wh, VARh and VAh for this accumulation interval:

If Vrms_A < Vthreshold (i.e. there’s no voltage, probably tampering)

Figure watts with a default voltage, but don’t lie about sensed voltage:

Vrms_A = 0

if abs(Irms_A) > IThreshold,

va0sum = Irms_A * defaultV

w0sum = va0sum

else

set them to zero

varh0 = 0

Repeat for element B

else

v1.1v1.1

TERIDIAN Proprietary

80 of 116

© Copyright 2005-2008 TERIDIAN Semiconductor Corporation

Advertising
This manual is related to the following products: