TERIDIAN Semiconductor Corporation makes no warranty for the use of its products, other than expressly contained in the
Company’s warranty detailed in the TERIDIAN Semiconductor Corporation standard Terms and Conditions. The company assumes
no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed
herein at any time without notice and does not make any commitment to update the information contained herein.
1.1 General ............................................................................................................................................................... 9
1.2 Safety and ESD Notes ....................................................................................................................................... 9
1.5 Suggested Equipment not Included .............................................................................................................. 10
1.6 Demo Board Test Setup .................................................................................................................................. 10
1.6.1 Power Supply Setup ................................................................................................................................... 12
1.6.2 CABLE for Serial Connection ..................................................................................................................... 13
1.6.4 Serial Connection Setup for the PC............................................................................................................ 14
1.7 Using the Demo Board .................................................................................................................................... 15
1.7.1 Cycling the LCD Display ............................................................................................................................. 15
1.7.2 Serial Command Line Interface (CLI) ......................................................................................................... 16
1.7.3 Communicating via Intel Hex Records ....................................................................................................... 22
1.7.4 Using the Battery Modes ............................................................................................................................ 24
1.8 Using the Demo Board for Metering Functions ............................................................................................ 25
1.8.1 Modifying Demo Code to CT or SHUNT Mode ........................................................................................... 25
1.8.2 Using the Demo Board in SHUNT and CT Modes ..................................................................................... 25
1.8.3 Adjusting the kh Factor for the Demo Board .............................................................................................. 26
1.8.4 Adjusting the Demo Boards to Different CT Winding Ratios ...................................................................... 27
1.8.5 Adjusting the Demo Boards to Voltage Transformers or Different Voltage Dividers ................................... 27
1.8.6 Wiring of the Demo Board and a Shunt Resistor ........................................................................................ 27
2 APPLICATION INFORMATION ........................................................................................................................ 43
2.1 Calibration Theory ........................................................................................................................................... 43
2.1.1 Calibration with Three Measurements ........................................................................................................ 43
2.1.2 Calibration with Five Measurements .......................................................................................................... 45
2.1.3 Fast Calibration .......................................................................................................................................... 46
2.2.1 General Precautions ................................................................................................................................... 47
2.2.2 Calibration Procedure with Three Measurements ...................................................................................... 48
2.2.3 Calibration Procedure with Five Measurements ......................................................................................... 48
2.2.4 Procedure for Auto-Calibration ................................................................................................................... 49
2.2.6 Compensating for Non-Linearities .............................................................................................................. 51
2.2.7 Calibrating Meters with Combined CT and Shunt Resistor ........................................................................ 51
2.3 Calibrating and Compensating the RTC ........................................................................................................ 54
2.4 Testing the Demo Board ................................................................................................................................. 55
2.4.1 Functional Meter Test ................................................................................................................................. 55
4.4 Debug Board Bill of Material .......................................................................................................................... 75
4.7 TERIDIAN 71M6531 Pin-Out Information ....................................................................................................... 80
4.8 Revision History .............................................................................................................................................. 83
Figure 1-7: Connection of the Pre-Wired Shunt Resistor ............................................................................................. 29
Figure 1-10: Emulator Window Showing Erased Flash Memory and File Load Menu .................................................. 32
Figure 2-1: Watt Meter with Gain and Phase Errors. ................................................................................................... 43
Figure 2-3: Calibration Spreadsheet for Three Measurements .................................................................................... 49
Figure 2-4: Calibration Spreadsheet for Five Measurements ....................................................................................... 50
Figure 2-5: Calibration Spreadsheet for Fast Calibration ............................................................................................. 50
Figure 2-6: Non-Linearity Caused by Quantification Noise .......................................................................................... 51
Figure 2-7: 71M6531 with Shunt and CT ..................................................................................................................... 52
Figure 2-17: Meter with Calibration System ................................................................................................................. 56
Figure 2-18: Calibration System Screen ...................................................................................................................... 56
Figure 3-1: 71M6531N12A2 Board Connectors, Jumpers, Switches, and Test Points ................................................ 62
Figure 4-12: Debug Board: Top Signal Layer ............................................................................................................... 78
Table 1-4: COM Port Setup Parameters ...................................................................................................................... 14
Table 1-6: Fields of a Hex Record ................................................................................................................................ 22
Table 1-7: Data (command) types ................................................................................................................................ 23
Table 1-8: Hex Record examples ................................................................................................................................. 23
Table 1-9: Pre-assembled hex records ........................................................................................................................ 24
Table 1-10: XRAM Locations for Calibration Constants ............................................................................................... 30
Table 4-1: 71M6531N12A2 Demo Board: Bill of Material (Shunt Version) ................................................................... 69
Table 4-2: Debug Board: Bill of Material ...................................................................................................................... 75
The TERIDIAN Semiconductor Corporation (TSC) 71M6531 Demo Board is an energy meter IC demonstration board for evaluating the 71M6531D/F device for residential electronic energy metering applications. It
incorporates a 71M6531D/F integrated circuit, peripheral circuitry such as a serial EEPROM, emulator port,
and on-board power supply as well as a companion Debug Board that allows a connection to a PC through
a RS232 port. The Demo Board allows the evaluation of the 71M6531D/F energy meter controller chip for
measurement accuracy and overall system use.
The board is pre-programmed with a Demo Program (file name 6531_demo.hex) in the FLASH memory of
the 71M6531D/F IC. This embedded application is developed to exercise all low-level functions to directly
manage the peripherals and CPU (clock, timing, power savings, etc.).
1.2 SAFETY AND ESD NOTES
Connecting live voltages to the Demo Board system will result in potentially hazardous voltages on the
Demo Board.
EXTREME CAUTION SHOULD BE TAKEN WHEN HAN DLING THE DEMO BOARD
ONCE IT IS CONNECTED TO LIVE VOLTAGES!
THE DEMO SYSTEM IS ESD SENSITIVE! ESD PRECAUTIONS SHOULD BE
TAKEN WHEN HANDLING THE DEMO BOARD!
1.3 DEMO KIT CONTENTS
•71M6531 Demo Board containing 71M6531D/F IC with preloaded Demo Program and prepared for
either CT or shunt resistor operation
• Debug Board
• Shunt resistor with wire harness, 400µΩ (for kits shipped in shunt configuration)
6531_4p6q_12may08_1cc.hex EQU 1), 6531_4p6q_12may08_2cc.hex (EQU 2), or later
1.5 SUGGESTED EQUIPMENT NOT INCLUDED
For functional demonstration:
®
• PC w/ MS-Windows
connector
• One or two current transformers (CTs), preferably 2,000:1 turns ratio
• For software development (MPU code):
• Signum ICE (In Circuit Emulator): ADM-51
• http://www.signum.com
• Keil 8051 “C” Compiler kit: CA51
versions XP, ME, or 2000, equipped with RS232 port (COM port) via DB9
http://www.keil.com/c51/ca51kit.htm
, http://www.keil.com/product/sales.htm
1.6 DEMO BOARD TEST SETUP
Figure 1-1 shows the basic connections of the Demo Boards plus Debug Boards with the external
equipment.
Demo
Board
5VDC Power
Debug
Board
Spacer
removed
5VDC Power
Figure 1-1: Demo Board: Basic Connections
The Debug Board can be plugged into J2 of the Demo Board. One spacer of the Debug Board should be
removed, as shown in Figure 1-1. Alternatively, both boards can be connected using a flat ribbon cable, as
shown in Figure 1-2. A male header has to be soldered to J3 of the Debug Board, and the female-to-female
flat ribbon cable is not
supplied with the Demo Kit (use Digi-Key P/N A3AKA-1606M-ND or similar).
Host PC
71M6531 Demo Board User’s Manual
Ribbon Cable
5VDC Power
Demo
Debug Board
Board
5VDC Power
Figure 1-2: Demo Board: Ribbon Cable Connections
The 71M6531 Demo Board block diagram is shown in Figure 1-3. It consists of a stand-alone meter Demo
Board and an optional Debug Board. The Demo Board contains all circuits necessary for operation as a
meter, including display, calibration LED, and power supply. The Debug Board, when not sharing a power
supply with the meter, is optically isolated from the meter and interfaces to a PC through a 9 pin serial port.
Connections to the external signals to be measured, i.e. scaled AC voltages and current signals derived
from shunt resistors or current transformers, are provided on the rear side of the Demo Board.
It is recommended to set up the Demo Board with no live AC voltage connected, and to
connect live AC voltages only after the user is familiar with the demo system.
Figure 1-3: The TERIDIAN 6531 Demo Board with Debug Board Block Diagram (CT Configuration)
Note: All analog input signals are referenced to the V3P3A net (3.3V power supply to the chip).
1.6.1 POWER SUPPLY SETUP
There are several choices for meter the power supply:
•Internal (using the AC line voltage). The internal power supply is only suitable when the line voltage
exceeds 220V RMS.
• External 5VDC connector (J1) on the Demo Board
• External 5VDC connector (J1) on the Debug Board.
The power supply jumper, JP1, must be consistent with the power supply choice. JP1 connects the AC
line voltage to the internal power supply. This jumper should usually be left in place.
When the Demo Board is in shunt configuration, the shunt resistor has to be connected as shown in
Figure 1-7 for the board to be powered via J1. Alternatively, a jumper cable between any header labeled
V3P3 and the NEUTRAL terminal (J9) can be supplied.
For connection of the DB9 serial port to a PC, either a straight or a so-called “null-modem” cable may be
used. JP1 and JP2 are plugged in for the straight cable, and JP3/JP4 are empty. The jumper configuration is
reversed for the null-modem cable, as shown in Table 1-3.
Cable
Configuration
Straight Cable
Null-Modem Cable Alternative -- -- Installed Installed
JP1 through JP4 can also be used to alter the connection when the PC is not configured as a DCE device.
Table 1-2 shows the connections necessary for the straight DB9 cable and the pin definitions.
Table 1-3 shows the connections necessary for the null-modem DB9 cable and the pin definitions.
Mode
Default
Table 1-1: Jumper settings on Debug Board
PC Pin Function Demo Board Pin
2 TX 2
3 RX 3
5 Signal Ground 5
Table 1-2: Straight cable connections
PC Pin Function Demo Board Pin
2 TX 3
3 RX 2
5 Signal Ground 5
Table 1-3: Null-modem cable connections
JP1 JP2 JP3 JP4
Installed Installed -- --
Jumpers on Debug Board
1.6.3 CHECKING OPERATION
A few seconds after power up, the LCD display on the Demo Board should briefly display the following
welcome text:
H E L L 0
After the “HELLO” text, the LCD should display the following information:
W h
and:
0.0 0 1
The text “Wh” indicates that accumulated Watt-hours are displayed. In the case shown above, 0.001 Wh
were accumulated. The display will be cycling from numeric to text, indicating activity of the MPU inside the
D/F. 71M6531
In Mission Mode, the display can be cycled to display VARh, PF and other parameters by pressing
the pushbutton (PB).
After connecting the DB9 serial port to a PC, start the HyperTerminal application (or any other suitable
communication program) and create a session using the communication parameters shown in Table 1-4.
Setup Paramete
Port speed (baud) 9600/300g
Data bits 8
Parity none
Stop bits 1
Flow control XON/XOFF
Table 1-4: COM Port Setup Parameters
HyperTerminal can be found by selecting Programs ÆAccessories Æ Communications from the Windows
start menu. The connection parameters are configured by selecting File Æ Properties and then by pressing
the Configure button (see Figure 1-4).
A setup file (file name “Demo Board Connection.ht”) for HyperTerminal that can be loaded with File Æ Open
is also provided with the tools and utilities on the supplied CD-ROM.
Note: Port parameters can only be adjusted when the connection is not active. The disconnect button, as
shown in Figure 1-5 must be clicked in order to disconnect the port.
Figure 1-5: Hyperterminal Sample Window with Disconnect Button
1.7 USING THE DEMO BOARD
The 71M6531 Demo Board is a ready-to-use meter prepared for use with an external shunt resistor.
Using the Demo Board involves communicating with the Demo Code. An interactive command line interface
(CLI) is available as part of the Demo Code. The CLI allows modifications to the metering parameters,
access to the EEPROM, initiation of auto-calibration sequences, selection of the displayed parameters,
changing calibration factors and many more operations.
Before evaluating the 71M6531 Demo Board, users should get familiar with the commands and responses
of the CLI. A complete description of the CLI is provided in section 1.7.2.
1.7.1 CYCLING THE LCD DISPLAY
The Demo Codes for the 71M6531 Demo Board allow cycling of the display using the PB button. By briefly
pressing the button, the next available parameter from Table 1-5 is selected. This makes it easy to navigate
various displays for Demo Boards that do not have the CLI.
Accumulated real energy [Wh]. The default display setting after power-up
or reset.
Accumulated reactive energy [VARh].
Expired hours after power-up or reset
Time of day (hh.mm.ss).
Date (yyyy.mm.dd).
Current power factor.
Count of zero crossings in the last accumulation interval.
Number of emitted pulses.
RMS current at phase A input [A].
RMS voltage at the VA_IN input [V].
Measured battery voltage [V].
Temperature difference from calibration temperature. Displayed in 0.1°C
Table 1-5: Selectable Display Options
1.7.2 SERIAL COMMAND LINE INTERFACE (CLI)
Once, communication to the Demo Board is established, press <CR> and the Demo Program prompt (“>”)
should appear. Type >i to verify that the Demo Program version is revision 4p6q or later.
Users should familiarize themselves with the Demo Program commands described in the tables below.
The Demo Program (Demo Code) is compiled with EEPROM specified as the non-volatile memory. This
means that the default calibration factors are stored in flash memory while the calibration factors resulting
from an actual calibration are stored in EEPROM.
The tables below describe the commands in detail. Type ‘?’ for a display of available commands.
Description: Allows user to read from and write to CE data space.
Usage: ] [Starting CE Data Address] [option]…[option]
Command
]??? Read consecutive 16-bit words in Decimal
combinations:
]$$$ Read consecutive 16-bit words in Hex
Update.
]U
default version of CE Data in EEPROM
Important: The CE must be stopped (C
E0)
before issuing this command!
Example: ]40$$$ Reads s 0x40, 0x41 and 0x42. CE data word
]7E=12345678=9876ABCD Writes two words starting @ 0x7E
CE da fromrds are in 4-byte (32-
ta space is the address range 0x1000 to 0x13FF. All CE data wo
bit) format. The offset of 0x1000 does not have to be entered when using the ] command, thus
typing ]A? will access the 32-bit word located at the byte address 0x1000 + 4 * A = 0x1028.
Commands for MPU/XDATA Access:
) MPU DATA ACCESS Remarks
Description: and write Allows user to read fromto MPU data space.
Usage: ) [Starting MPU Data Address] [option]…[option]
Command
c:
ombinations
)??? Read three consecutiv
e 32-bit words in Decimal
)$$$ Read three consecutive 32-bit words in Hex
)a=n=m
Write the values n and m to two consecutive
addresses starting at a
Example: )08$$$$ 0x0C, 0x10, 0x14 Reads data words 0x08,
)04=12345678=9876ABCD Writes two words starting @ 0x04
MPU o XDATAfor th. All MPU data words r space is the address range e MPU XRAM (0x0000 to 0x0FFF)
are in 4-byte (32-bit) format. Typing ]A? will access the 32-bit word located at the byte address 4 *
A = 0x28. The energy accumulation registers of the Demo Code can be accessed by typing two
question marks (“??”).
Commands for I/O RAM (Configuration RAM) and SFR Control:
R DIO AND SFR CONTROL Remarks
Description: Allows the user to read from and write to I/O RAM and special function registers (SFRs).
Usage: R [option] [register] … [option]
Command
combinations:
RIx…
Select I/O RAM location x (0x2000 offset is automatically added)
Rx… Select internal SFR at address x
Rx???... Read consecutive SFR registers in decimal
Rx$$$... Read consecutive registers in hex notation
Example: RI60$$$$ Read all four RTM probe registers
DIO or Configuration RAM space is the address range 0x2000 to 0x20FF. This RAM contains
registers used for configuring basic hardware and functional properties of the 71M6531D/F and is
organized in bytes (8 bits). The 0x2000 offset is automatically added when the command RI is
typed. The SFRs (special function registers) are located in internal RAM of the 80515 core,
starting at address 0x80.
Commands for EEPROM Control:
EE EEPROM CONTROL Remarks
Description: Allows user to enable read and write to EEPROM.
Usage: EE [option] [arguments]
Command
EECn EEPROM Access (1 Æ Enable, 0 Æ Disable)
combinations:
EERa.b Read EEPROM at address 'a' for 'b' bytes.
EEE Erase the EEPROM
EESabc..xyz Write characters to buffer (sets Write length)
EETa Transmit buffer to EEPROM at address 'a'.
EEWa.b...z Write values to buffer
Example: EEShello; EET$0210 Writes 'hello' starting at EEPROM address 0x210.
The EEC1 command must be issued before the EEPROM interface can be used. The execution of the EEE
command takes several seconds. During this time, no other commands can be entered.
Auxiliary Commands:
AUXILIARY Remarks
Description: Various
Commands: ,
Typing a comma (“,”) repeats the command issued
from the previous command line. This is very helpful
when examining the value at a certain address over
time, such as the XRAM address for the temperature.
/
The slash (“/”) is useful to separate comments from
commands when sending macro text files via the serial
interface. All characters in a line after the slash are
ignored.
Select input n for TMUX output pin. Enter n in hex
notation.
CREn RTM output control (1 Æ Enable, 0 Æ Disable)
CRSa.b.c.d
Selects CE addresses for RTM output (maximum of
four)
Example: CE0 Disables the CE
CT1E Selects the CE_BUSY signal for the TMUX output pin
Calibration Commands:
CL CALIBRATION CONTROL Remarks
Description:
Calibration-related commands. A full auto-calibration can be implemented by compiling the
Demo Code with auto-calibration selected as an option. Due to space restrictions, the
auto-calibration is not implemented in the Demo Code supplied with the Demo Boards.
Usage: CL [option]
Command
CLC Loads a calibration via serial port
combinations:
CLB Starts an auto-calibration sequence
CLD Restores calibration to defaults
CLR Restores calibration from EEPROM
CLS Saves calibration to EEPROM
Commands for Identification and Information:
I INFORMATION MESSAGES Remarks
Description: Allows user to display information messages.
Usage: I
Example: I Returns the Demo Code version
The I command is used to identify the revisions of Demo Code and the contained CE code.
Commands for Controlling the Metering Values Shown on the LCD Display:
M
Description: Allows user to select internal variables to be displayed.
Usage: M [option]. [option]
Command
combinations:
M1 Temperature (C° delta from nominal)
M2 Frequency (Hz)
M3. [phase] kWh Total Consumption (display wraps around at 999.999)
M4. [phase]
M5. [phase] kVARh Total Consumption (display wraps around at 999.999)
M6. [phase]
M7. [phase] VAh Total (display wraps around at 999.999)
M9 Real Time Clock
M10 Calendar Date
M13. n Main edge count (n = 0: accumulated, n = 1: last second)
M17 Battery voltage. Display will return to M3 after a few seconds.
Example: M3.1 Displays Wh total consumption of phase A.
Displays for total consumption wrap around at 999.999kWh (or kVARh, kVAh) due to the
number of available display digits. Internal registers (counters) of the Demo Code are 64 bits
wide and do not wrap around.
T
he internal accumulators in the Demo Code use 64 bits and will neither overflow nor wrap
a
round under normal circumstances. The restriction to only six digits is due to the
r
equirement to provide one digit showing the display mode that is separated by a blank digit
f
rom the displayed values.
METER DISPLAY
CONTROL (LCD)
M kWh Total Consumption (display wraps around at 999.999)
Remarks
kWh Total Inverse Consumption (display wraps around at
999.999)
kVAh Total Inverse Consumption (display wraps around at
999.999)
C
ommands for Controlling the RMS Values Shown on the LCD Display:
MR METER RMS DISPLAY
CONTROL (LCD)
Description: Allows user to select meter RMS display for voltage or current.
Usage: MR [option]. [option]
Command
combinations:
MR2. [phase] Displays instantaneous RMS voltage
Example: MR1.2 Displays phase b RMS current.
Commands for Controlling the MPU Power Save Mode:
PS POWER SAVE MODE Remarks
Description: Enters power save mode
Usage: PS
Return to normal mode is achieved by issuing a hardware reset.
MR1. [phase] Displays instantaneous RMS current
Remarks
Disables CE, ADC, CKOUT, ECK, RTM, TMUX VREF,
and serial port, sets MPU clock to 38.4KHz.
Description: Allows the user display and clear the error log.
Usage: ER [option] [value]
Command
combinations:
ERD Displays error log
ERS+n Enters error number n in error log
Example: ERS+10 Enters error number 10 in error log
ERC Clears all errors from error log
1.7.3 COMMUNICATING VIA INTEL HEX RECORDS
Communication with the 71M6531D/F IC, especially by computers and/or ATE, may also be accomplished
using a simplified protocol based on Intel Hex records. These records can still be sent and received with an
ordinary terminal, and coding and decoding of commands and responses is straight-forward.
Using the Hex-Record Format
Intel's Hex-record format allows program or data files to be encoded in a printable (ASCII) format, allowing
editing of the object file with standard tools and easy file transfer between a host and target. An individual
hex-record is a single line in a file composed of one or several Hex-records.
Entering “CLC” from the text-based command line interface enables the hex-record interface.
Hex-Records are character strings made of several fields which specify the record type, record length,
memory address, data, and checksum. Each byte of binary data is encoded as a 2-character hexadecimal
number: the first ASCII character representing the high-order 4 bits, and the second the low-order 4 bits of
the byte. The six fields that comprise a Hex-record are defined in Table 1-6.
Field Name Characters Description
1 Start code 1 An ASCII colon (":")
2 Byte count 2 The count of the character pairs in the data field.
The 2-byte address at which the data field is to be loaded into
3 Address 4
4 Type 2 00, 01, or 02.
5 Data 0-2n
6 Checksum 2
Table 1-6: Fields of a Hex Record
Each record may be terminated with a CR/LF/NULL character. Accuracy of transmission is ensured by the
byte count and checksum fields. This is important when series of values such as calibration constants are
transmitted to a meter, e.g. by ATE equipment in a factory setting. When entering hex records manually, the
user may also choose “FF” (“wild card”) as the checksum. In this case, the Demo Code omits comparing the
checksum with the received record(s).
This is how the checksum is calculated manually (if necessary):
1) The hex values of all bytes (except start code and checksum itself) are added up.
2) The last two hex digits are subtracted from 0xFF.
3) The value 0x01 is added.
memory. This is the physical XRAM or I/O RAM address, not
the 4-byte address used by the command-line interface (CLI).
From 0 to n bytes of executable code, or memory loadable
data.
n is normally 20 hex (32 decimal) or less.
The least significant byte of the two's complement sum of the
values represented by all the pairs of characters in the record
except the start code and checksum.
As opposed to the standardized Hex-records that offer three possible types (data, termination, segment
base), six different types are supported for communicating with the 71M6531D/F. These data types basically
encode command types (read/write) along with the data source or destination, as listed in Table 1-7.
Number Code Function
1 00 Write CE data record, contains data and 16-bit CE address (CE data RAM is
located at 0x1000).
2 01 End Of File (Quit) record, a file termination record. Contains no data. This record
has to be the last line of the file, and only one record per file is permitted. The
byte pattern is always ':00000001FF'.
Upon receipt of this record, the Demo Code will transfer the received data into
non-volatile memory (EEPROM).
3 02 Alternate form of Write CE data record (optional). CE data RAM is located at
0x1000.
4 03 Read CE data record, contains empty data field and 16-bit CE address (optional).
CE data RAM is located at 0x1000.
5 04 Write MPU or I/O RAM data record, contains data and 16-bit MPU address.
6 05 Read MPU or I/O RAM data record, contains empty data field and 16-bit MPU
address (optional). I/O RAM is located at 0x2000.
7 06 Write RTC data record, contains data and 16-bit RTC address.
8 07 Read RTC data record, contains empty data field and 16-bit RTC address
(optional).
9 08 Write SFR data record, contains data and 16-bit SFR address (optional). The
MSB is always zero (0).
10 09 Read SFR data record, contains empty data field and 16-bit SFR address
(optional).
Table 1-7: Data (command) types
Table 1-8 lists a few examples of hex records.
Hex Record Function
:08 0000 06 00 00 0C 03 18 05 06 00 ff
Writes (06) eight bytes (08) to RTC, setting the
RTC to zero seconds (00), minutes (00), 12
hours (0C), Wednesday (03), 24
(05), 2006 (06). Uses the wild card checksum.
Writes the default values (0x4000) for the
calibration constants CAL_IA, CAL_IB,
CAL_VA, and CAL_VC to the XRAM (00),
starting at address 0x10 (0010).
The second command causes the Demo Code
to write the data to permanent storage.
:10 1020 03 FF
Causes the Demo Board to display the CE data
from address 0x1020 to 0x102F
Table 1-8: Hex Record examples
The Demo Board will not echo any inputs from the terminal (they screen will stay blank except for
the asterisk (*) issued after the user enters <CR><LF>). It is useful to configure Hyperterminal for
“auto-echo”. This can be done by selecting “Properties” from the “File” menu, then clicking on the
“Settings” tab and clicking the “ASCII Setup” button.
No <ENTER> key is necessary at the end of a manually entered record.
Spaces in between the fields (to increase readability), as in the example above, are ignored by the Demo
Boards.
If a hex record is accepted, the Demo Board returns a "
Board sends a "
When only a partial record is entered, the Demo Board will time out after around 30 seconds and then send
<CR>< LF>.
A number of pre-assembled hex records is supplied with the Demo Code. It is easier to send a pre-assembled record using the “send text file” feature in the “Transfer” menu of Hyperterminal, than assembling hex
record from scratch.
The pre-assembled hex records are contained in a ZIP file named 6531_scripts.zip on the CD-ROM
supplied with the Demo Kits. Table 1-9 shows the records available and their function.
Hex Record Name Function
set_6531_defaults.txt
read_6531_temp.txt
set_6531_temp.txt
read_6531_power.txt
read_6531_ce.txt
read_6531_config.txt
set_6531_rtm.txt
?" and other text, depending on the context (only the 16KB Demo Code will send text).
Sets the default configuration, including all CE variables. Transferring
this record is necessary when data in the EEPROM is lost or
compromised.
Displays the current temperature reading from the CE
This record can be edited to set the nominal (calibration) temperature
Displays the valid power data
Displays CE data from memory locations 0x1020 to 0x10FF
Displays configuration data. This hex record includes comment text
helping to interpret the received data.
Sets up the real-time monitor
!". If the hex record is not accepted, the Demo
Table 1-9: Pre-assembled hex records
1.7.4 USING THE BATTERY MODES
The 71M6531D/F is in so-called Mission mode, as long as 3.3VDC is supplied to the V3P3SYS pin. If this
voltage is below the minimum required operating voltage which is usually indicated by V1 < 1.6 (internal
VBIAS voltage), and if no battery is connected to the VBAT pin, the chip is powered off.
Battery modes can be used if a battery or other DC source supplying a DC voltage with in the operating
limits for the battery input is applied to the battery pin (VBAT, pin 49) of the chip. On the Demo Board, the
battery should be connected to pin 2 (+) and 3 (-) of JP8.
In order to prevent corruption of external memory, which could occur when main power
is removed from the Demo Board while no batter y is present, the Demo Cod e is shipped
with the battery modes DISABLED
halted once it enters brownout mode, even when a battery is present . See section 1.10.2
for instruction on how to enable battery modes.
If the main power source (internal or external power supply) is removed while a battery is connected to JP8
as described above, and if the battery modes are enabled with header JP12, the 71M6531D/F automatically
enters Brownout mode. The Demo Code will then automatically transition from Brownout mode to Sleep
mode.
By pressing the pushbutton PB, the chip is temporarily brought back to LCD mode. After a few seconds in
LCD mode, the chip returns to Sleep mode.
By pressing the RESET pushbutton while the chip is in Sleep mode, the chip will enter Brownout mode.
Both the RESET and PB buttons are powered by the battery voltage (VBAT).
In Brownout mode, the analog functions are disabled, and the MPU functions at very low speed. DIO pins
and the UART are still functional. If the chip supports the command line interface, it will signal Brownout
. When the battery modes are disabled, the MPU will be
mode, and the command prompt “B” will be visible on the terminal connected to the Demo Board, followed
by the “>” sign:
B>
The LCD displays a decimal dot in the left-most digit to indicate that it is in Brownout mode, as shown below:
.
The following commands can be entered via the CLI in Brownout mode:
• BL – enters LCD mode
• BS – enters Sleep mode.
• BWSn – enters sleep mode for n seconds, then returns to Brownout mode
• BWMm – enters sleep mode for m minutes, then returns to Brownout mode
In Sleep Mode, almost all functions are disabled. Only the RTC and the wakeup timer are still active. The
wakeup signal from the timer and the pushbutton (SW2 on the Demo Board) take the 71M6531D/F back to
Brownout mode.
A hardware reset, while in any battery mode, takes the 71M6531D/F back to Brownout mode.
H E L L O
1.8 USING THE DEMO BOARD FOR METERING FUNCTIONS
1.8.1 MODIFYING DEMO CODE TO CT OR SHUNT MODE
Script files contained in the CD-ROM shipped with the Demo Kit can be used to modify the constants used
in the Demo Code from CT to shunt mode or vice versa. Three script files are available:
1. 6531ctct.txt sets 6531 Demo Code for IA: 2000:1 CT (Imax = 208A) and IB:
To apply a script file, select “transfer -> send_text_file” from the HyperTerminal user interface.
1.8.2 USING THE DEMO BOARD IN SHUNT AND CT MODES
The Demo Board may be used with current shunt sensors of 400µΩ resistance or current transformers
(CTs). It is programmable for a Kh factor of 1.0 and (see Section 0 for adjusting the Demo Board for current
transformers). Section 1.8.6 describes proper wiring and safety precautions for shunt operation.
Once, voltage is applied and load current is flowing, the red LED D5 will flash each time an energy sum of
1.0 Wh is collected. The LCD display will show the accumulated energy in Wh when set to display mode 3
(command
Similarly, the red LED D6 will flash each time an energy sum of 1.0 VARh is collected. The LCD display will
show the accumulated energy in VARh when set to display mode 5 (command
The D6531N12A2 Demo Boards can be operated with CTs on channel B, which is equipped with the proper
burden resistors for 2000:1 CTs.