Energy Meter IC Family Software Instruction Manual

71M652X Software User’s Guide
Revision 1.7 TERIDIAN Proprietary 41 of 138
© Copyright 2005-2007 TERIDIAN Semiconductor Corporation
There is a known defect in version 7.50a of the Keil compiler:
Memory types must be explicitly defined in local variables. Using a predefined type is not explicit
enough, i.e. "char xdata c;" is ok. "typedef char int8_t; ... int8_t data c;" is OK,
but "typedef char data int8d_t; ... int8d_t c;" is not OK.
5.2 DEMO CODE OPTIONS AND PROGRAM SIZE
Since the 71M6512 is available with three different memory sizes, different versions of the Demo Code are provided
that take into account the available memory size (see Table 5-3). An attempt has been made to provide the most
common features in each version of the Demo Code. Flexibility is provided by the source code for users when re-
compiling the source code: If a certain feature is not required, it can be left out and replaced with a different feature of
equal or smaller code size.
The object files contained in the Demo Kits have been generated with the following Keil compiler versions:
C compiler: C51.exe, V8.02
Assembler: A51.exe, V8.00
Linker/Locator: BL51.exe, V6.00
Librarian: LIB51.exe, V4.24
Hex-converter: OH51.exe, V3.03
Dialog DLL: DP51.dll, V2.47
Target DLL: bin\mon51.dll, V2.40
Dialog DLL: TP51.dll, V2.47
Version
Flash
Code Size
Description
Basic
Wattmeter
8KB Demonstrates a meter with 8KB of code space. The software offers tamper protection,
calibration and nonvolatile energy registers. It utilizes special CE code.
This implementation has a 0.82KB margin of empty code space.
Intermediate
Meter
16KB Demonstrates a meter with 16KB of code space. The software is easy to reconfigure by
recompiling, and offers full tamper protection, calibration and nonvolatile energy
registers.
This implementation has a 3.2KB margin of empty code space
Demonstration
Meter
32KB Demonstrates a meter with 32k of code space. The software is easy to reconfigure by
recompiling. It shall has full tamper protection, calibration and nonvolatile energy
registers. The software demonstrates a full feature set.
This implementation has a 6.4KB margin of empty code space, not including the
command line interpreter, but including a calibration interface
Table 5-3: Demo Code Versions
In addition to providing flexibility, an attempt has been made to leave a certain amount of unoccupied memory space
when generating the Demo Code. This should provide some room for users who want to modify the Demo Code and
experiment with small changes.
The tables presented below show the features available for the three versions of the Demo Code plus the code size
required for each feature. Entries for code size are approximated and depend on code module combination.
Y means that the feature is implemented, N means that it is not. N/opt means that the feature may be implemented if
enough memory space is available.