71M6521 Demo Board User’s Manual
Revision 2.18
© 2005-2009 TERIDIAN Semiconductor Corporation
Page: 33 of 111
Again, the command line interface can be used to store the calibration constants in their respective CE RAM
addresses. For example, the command
>]8=+16302
stores the decimal value 16302 in the CE RAM location controlling the gain of the voltage channel (
CAL_VA
).
Constant
CE
Address
(hex)
Physical
Address
(hex)
Description
CAL_VA
CAL_VB
0x09
0x0B
0x1024
0x102C
Adjusts the gain of the voltage channel. +16384 is the typical
value. The gain is directly proportional to the CAL parameter.
Allowed range is 0 to 32767. If the gain is 1% slow, CAL should
be increased by 1%.
CAL_IA
CAL_IB
0x08
0x0A
0x1020
0x1028
Adjusts the gain of the current channels. +16384 is the typical
value. The gain is directly proportional to the CAL parameter.
Allowed range is 0 to 32767. If the gain is 1% slow, CAL should
be increased by 1%.
PHADJ_A
PHADJ_B
1
0x0C
0x0D
0x1030
0x1034
This constant controls the CT phase compensation. No
compensation occurs when PHADJ=0. As PHADJ is increased,
more compensation is introduced.
Note:
PHADJ_B
1
applies to 3W/1-phase systems.
Table 1-11: CE RAM Locations for Calibration Constants
1.9.2 UPDATING THE 6521_DEMO.HEX FILE
The d_merge program updates the 6521_demo.hex file with the values contained in the macro file. This
program is executed from a DOS command line window. Executing the d_merge program with no arguments
will display the syntax description. To merge macro.txt and old_6521_demo.hex into new_6521_demo.hex,
use the command:
d_merge old_6521_demo.hex macro.txt new_6521_demo.hex
The new hex file can be written to the 71M6521 through the ICE port using the ADM51 in-circuit emulator.
This step makes the calibration to the meter permanent.
1.9.3 CALIBRATION MACRO FILE
The macro file in Figure 1-10 contains a sequence of commands to be used for Demo Boards that provide a
serial command line interface (CLI). It is a simple text file and can be created with Notepad or an equivalent
ASCII editor program. The file is executed with HyperTerminal’s
Transfer->Send Text File
command.
Figure 1-10: Typical Calibration Macro file
It is possible to send the calibration macro file to the 71M6521 for “temporary” calibration. This will
temporarily change the CE data values. Upon power up, these values are refreshed back to the default
values stored in flash memory. Thus, until the flash memory is updated, the macro file must be loaded each
time the part is powered up. The macro file is run by first issuing the ce0 command to turn off the compute
engine and then sending the file with the
transfer
send text file
procedure. Turning off the CE before
changing CE constants is not a hardware requirement of the chip, but is recommended because of the way
the demo code is written.
]8=+16022/ CAL_IA (gain=CAL_IA/16384)
]9=+16381/ CAL_VA (gain=CAL_VA/16384)
]a=+16019/ CAL_IB (gain=CAL_IB/16384)
]b=+16370/ CAL_VB (gain=CAL_VB/16384)
]c=+115/
PHADJ_A (default 0)
]d=+113/
PHADJ_B (default 0)
ce1