
71M6521 Demo Board User’s Manual
Revision 2.18
© 2005-2009 TERIDIAN Semiconductor Corporation
Page: 37 of 111
1.10.2 DEMO CODE VARIATIONS
All recent Demo Kits are shipped with the 71M6521FE meter IC (32 KB of flash memory). The Demo Code
version programmed into the chip installed in the Demo Board is for the 71M6521FE and for shunt/CT
operation.
When planning to develop code for a 71M6521 meter IC with smaller flash size, it can be useful to load the
Demo Codes that were written for the smaller flash sizes into the 71M6521FE IC.
•
The Demo Code for the 71M6521FE chip (32KB of flash) supports a command line interface. This
means that the user can directly communicate with the program by typing commands consisting of
text and numbers using a terminal or PC.
•
Demo Codes for the 71M6521BE and 71M6521DE have a much more basic user interface that
utilizes Intel hex records for serial communication.
1.10.3 ACCESSING LCD AND SLEEP MODES FROM BROWNOUT MODE
Header JP12 controls the behavior of the Demo Code when system power is off. The setting of JP12 is read
on power up (or after reset), and controls the Demo Code as follows:
•
Jumper across pins 1-2 (GND): The Demo Code will communicate at 9600bd. No transitions to
sleep or LCD mode will be made from brownout mode.
•
Jumper across pins 2-3 (V3P3): The Demo Code will communicate at 300bd. Transitions to sleep
or LCD mode can be made from brownout mode.
This operation mode requires connection of a
battery or equivalent DC voltage at JP8.
1.10.4 DEMO CODE MEMORY LOCATIONS FOR THE 71M6521DE/FE
Registers in MPU data RAM can be accessed via the command line interface (71M6521FE) or the using the
method involving Intel Hex records (71M6521DE).
Table 1-13 lists MPU addresses of interest. Manipulating the values in the MPU addresses enables the user
to change the behavior of the meter. For example, if the current transformer external to the Demo Board is
changed, a different IMAX value n may have to be applied. This can be done by changing the value in the
address 0x0A using the CLI command
)A=n
. Modifications to MPU data RAM will not be maintained when a
reset or power-up occurs.
Changes to the MPU data RAM can be made permanent by creating a macro file containing
one or several CLI commands and merging the macro file into the code using the
io_merge utility described in section 1.9.2.
The following is an example showing how the battery bit can be set permanently by creating a new object
file:
A text file (battery.txt) is generated, containing the CLI command
)1=20
. The
io_merge
utility is called,
using the following syntax (
6521_demo.hex
is the existing object file):
io_merge 6521_demo.hex battery.txt new_6521_demo.hex
Now, the object file
new_6521_demo.hex
contains the battery bit.