beautypg.com

5 temperature compensation, 18 test modules, 1 6513 ce example – Maxim Integrated 71M6521BE Energy Meter IC Family Software User Manual

Page 99: 2 serial port tests, 3 timer tests, 4 eeprom tests, 5 generating dio pulses on reset, 6 testing the security bit, Temperature compensation, Test modules

background image

71M652X Software User’s Guide

Revision 1.7

TERIDIAN Proprietary

99 of 138

© Copyright 2005-2007 TERIDIAN Semiconductor Corporation

5.17.5

Temperature Compensation

When operating with “internal” temperature compensation, the 71M6511 and 71M6513 ICs use the CE as the
compensation mechanism. Compensation is then based on the temperature deviation from nominal and the PPMC and
PPMC2 factors that are either derived from the on-chip fuses (71M6511H/6513H) or standard values (71M6511/6513)
that apply to the average chip.

In the 71M6521, the CE is no longer in charge of temperature compensation. In the 71M6521, the temperature
calculations are performed once per second in the MPU firmware (see Gain_Compensation() in meter.c). The gain
calculations set a global gain parameter (“gain_adj”) used by the CE code. As a side-effect, the parameters PPMC and
PPMC2, the coefficients that control the meter’s linear and quadratic gain by temperature, are now in MPU memory
space, rather than CE memory space. This causes very little loss of accuracy because the temperature changes only
slowly.

5.18 TEST MODULES

Various Test Modules are available from TERIDIAN. These Test Modules are small Keil projects that can be used to
test various functions of the 71M6521 IC. The available Test Modules are described in this section.

5.18.1

6513 CE Example

Even though written for the 71M6513, this Test Module can be used for the 71M6521. It builds a simple test code that
starts and runs the compute engine, collects meter data in RAM, and generates pulses for one accumulation interval.

The Keil project file is 6513_ce_example.uv2.

5.18.2

Serial Port Tests

These Test Modules build simple tests of the serial ports. The tests start by sending the ASCII character "E" in a loop,
e.g. For testing with an oscilloscope. As soon as a character is received, the test code begins echoing typed
characters, using polling IO. Sending the period character ( ".") switches the I/O to interrupting I/O.

Note that ser0test.c and ser1test.c use identical text, except for the include file. This is a very convenient technique for
moving serial I/O to a different port when requirements change.

The Keil project files are ser0test.uv2 and ser1test.uv2.

5.18.3

Timer Tests

These Test Modules build simple routines for testing of the interrupting timers, run both once, and periodically. The
routines include an extended 30-second test that can be used with a stop-watch timer to measure accuracy.

Note that tmr0test.c and tmr1test.c use identical text except for the include file. This is a very convenient technique for
moving a timer IO to a different port when requirements change.

The Keil project files are tmr0test.uv2 and tmr1test.uv2.

5.18.4

EEPROM Tests

This routine demonstrates the use and test of the eeprom interface.

The Keil project file is eepromtest.uv2.

5.18.5

Generating DIO Pulses on Reset

This Test Module is written in 8051 assembler and is executed after processor reset. It pulses DIO7 on a meter chip.
This function is useful as a scope loop to discover if the chip resets when expected.

The Keil project file is RESET_PULSES_DIO7.UV2.

5.18.6

Testing the Security Bit

This Test Module is written in 8051 assembler and is executed after processor reset. It sets the security bit and then
displays the security bit on DIO_7. It is useful to test the behavior of the security bit under various system conditions.