Teridian 71M6534H User Manual

71M6534H Demo Board
USER’S MANUAL
5/28/2008 1:33:00 PM
V2-0
TERIDIAN Semiconductor Corporation
6440 Oak Canyon Rd., Suite 100
Phone: (714) 508-8800 Fax: (714) 508-8878
http://www.teridian.com/
meter.support@teridian.com
71M6534H Demo Board User’s Manual
Page: 2 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
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 re­sponsibility 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.
Page: 3 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
71M6534H
3-Phase Energy Meter IC
DEMO BOARD
USER’S MANUAL
Page: 4 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Table of Contents
1 GETTING STARTED................................................................................................................................................ 9
1.1 General .................................................................................................................................................................... 9
1.2 Safety and ESD Precautions ................................................................................................................................. 9
1.3 Demo Kit Contents ................................................................................................................................................. 9
1.4 Demo Board Versions .......................................................................................................................................... 10
1.5 Compatibility ......................................................................................................................................................... 10
1.6 Suggested Equipment not Included ................................................................................................................... 10
1.7 Demo Board Test Setup ....................................................................................................................................... 10
1.7.1 Power Supply Setup ........................................................................................................................................ 13
1.7.2 Cable for Serial Connection (Debug Board) .................................................................................................... 13
1.7.3 Checking Operation ......................................................................................................................................... 14
1.7.4 Serial Connection Setup .................................................................................................................................. 15
1.8 Using the Demo Board ......................................................................................................................................... 16
1.8.1 Serial Command Language ............................................................................................................................. 17
1.8.2 Using the Demo Board for Energy Measurements .......................................................................................... 25
1.8.3 Adjusting the Kh Factor for the Demo Board ................................................................................................... 25
1.8.4 Adjusting the Demo Boards to Different Current Transformers ....................................................................... 26
1.8.5 Adjusting the Demo Boards to Different Voltage Dividers ............................................................................... 26
1.9 Calibration Parameters ........................................................................................................................................ 27
1.9.1 General Calibration Procedure ........................................................................................................................ 27
1.9.2 Calibration Macro File ..................................................................................................................................... 28
1.9.3 Updating the 6534_demo.hex file .................................................................................................................... 28
1.9.4 Updating Calibration Data in Flash Memory without Using the ICE or a Programmer .................................... 28
1.9.5 Automatic Calibration (Auto-Cal) ..................................................................................................................... 29
1.9.6 Loading the 6534_demo.hex file into the Demo Board.................................................................................... 29
1.9.7 The Programming Interface of the 71M6534/6534H ....................................................................................... 31
1.10 Demo Code ........................................................................................................................................................ 32
1.10.1 Demo Code Description ............................................................................................................................... 32
1.10.2 Important Demo Code MPU Parameters ..................................................................................................... 33
1.10.3 Useful CLI Commands Involving the MPU and CE ...................................................................................... 39
1.11 Using the ICE (In-Circuit Emulator) ................................................................................................................. 39
2 APPLICATION INFORMATION ............................................................................................................................. 41
2.1 Calibration Theory ................................................................................................................................................ 41
2.1.1 Calibration with Three Measurements ............................................................................................................. 41
2.1.2 Calibration with Five Measurements ............................................................................................................... 43
2.1.3 Fast Calibration ............................................................................................................................................... 44
2.2 Calibration Procedures ........................................................................................................................................ 45
2.2.1 Calibration Procedure with Three Measurements ........................................................................................... 46
2.2.2 Calibration Procedure with Five Measurements .............................................................................................. 47
2.2.3 Fast Calibration – Auto-Calibration.................................................................................................................. 47
2.2.4 Calibration Procedure for Rogowski Coil Sensors ........................................................................................... 48
2.2.5 Calibration Spreadsheets ................................................................................................................................ 49
2.2.6 Compensating for Non-Linearities ................................................................................................................... 52
2.3 Calibrating and Compensating the RTC ............................................................................................................. 53
2.4 Schematic Information ......................................................................................................................................... 54
2.4.1 Components for the V1 Pin ............................................................................................................................. 54
2.4.2 Reset Circuit .................................................................................................................................................... 54
2.4.3 Oscillator ......................................................................................................................................................... 55
Page: 5 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
2.4.4
EEPROM ......................................................................................................................................................... 55
2.4.5 LCD ................................................................................................................................................................. 56
2.4.6 Optical Interface .............................................................................................................................................. 56
2.5 Testing the Demo Board ...................................................................................................................................... 57
2.5.1 Functional Meter Test ...................................................................................................................................... 57
2.5.2 EEPROM ......................................................................................................................................................... 58
2.5.3 RTC ................................................................................................................................................................. 59
2.5.4 Hardware Watchdog Timer (WDT) .................................................................................................................. 59
2.5.5 LCD ................................................................................................................................................................. 59
2.6 TERIDIAN Application Notes ............................................................................................................................... 60
3 HARDWARE DESCRIPTION ................................................................................................................................. 61
3.1 D6534T14A2 Board Description: Jumpers, Switches and Test Points ............................................................ 61
3.2 Board Hardware Specifications .......................................................................................................................... 64
4 APPENDIX ............................................................................................................................................................. 65
4.1 D6534T14A2 Schematics, PCB Layout and BOM .............................................................................................. 66
4.2 Debug Board Description .................................................................................................................................... 76
4.3 71M6534H IC Description ..................................................................................................................................... 81
4.4 Formulae for Fast Calibration ............................................................................................................................. 84
List of Figures
Figure 1-1: TERIDIAN D6534T14A2 Demo Board with Debug Board: Basic Connections ............................................... 11
Figure 1-2: Block diagram for the TERIDIAN D6534T14A2 Demo Board with Debug Board ............................................ 12
Figure 1-3: Hyperterminal Sample Window with Disconnect Button (Arrow) ..................................................................... 15
Figure 1-4: Port Speed and Handshake Setup (left) and Port Bit setup (right) .................................................................. 16
Figure 1-5: Command Line Help Display .......................................................................................................................... 17
Figure 1-6: Typical Calibration Macro File ......................................................................................................................... 28
Figure 1-7: Emulator Window Showing Reset and Erase Buttons (see Arrows) ............................................................... 30
Figure 1-8: Emulator Window Showing Erased Flash Memory and File Load Menu ......................................................... 30
Figure 2-1: Watt Meter with Gain and Phase Errors. ......................................................................................................... 41
Figure 2-2: Phase Angle Definitions .................................................................................................................................. 45
Figure 2-3: Calibration Spreadsheet for Three Measurements ......................................................................................... 50
Figure 2-4: Calibration Spreadsheet for Five Measurements ............................................................................................ 50
Figure 2-5: Calibration Spreadsheet for Rogowski coil ..................................................................................................... 51
Figure 2-6: Non-Linearity Caused by Quantification Noise ............................................................................................... 52
Figure 2-7: Voltage Divider for V1 ..................................................................................................................................... 54
Figure 2-8: External Components for RESET ................................................................................................................... 54
Figure 2-9: Oscillator Circuit .............................................................................................................................................. 55
Figure 2-10: EEPROM Circuit ........................................................................................................................................... 55
Figure 2-11: LCD Connections .......................................................................................................................................... 56
Figure 2-12: Optical Interface Block Diagram ................................................................................................................... 56
Figure 2-13: Meter with Calibration System ...................................................................................................................... 57
Figure 2-14: Calibration System Screen ........................................................................................................................... 58
Figure 3-1: D6534T14A2 Demo Board - Board Description (Default jumper settings indicated in yellow) ........................ 63
Figure 4-1: TERIDIAN D6534T14A2 Demo Board: Electrical Schematic 1/3 .................................................................... 66
Figure 4-2: TERIDIAN D6534T14A2 Demo Board: Electrical Schematic 2/3 .................................................................... 67
Figure 4-3: TERIDIAN D6534T14A2 Demo Board: Electrical Schematic 3/3 .................................................................... 68
Figure 4-4: TERIDIAN D6534T14A2 Demo Board: Top View ........................................................................................... 70
Figure 4-5: TERIDIAN D6534T14A2 Demo Board: Bottom View ...................................................................................... 71
Page: 6 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Figure 4-6: TERIDIAN D6534T14A2 Demo Board: Top Signal Layer ............................................................................... 72
Figure 4-7: TERIDIAN D6534T14A2 Demo Board: Bottom Signal Layer .......................................................................... 75
Figure 4-8: TERIDIAN D6534T14A2 Demo Board: Ground Layer .................................................................................... 73
Figure 4-9: TERIDIAN D6534T14A2 Demo Board: V3P3 Layer ....................................................................................... 74
Figure 4-10: Debug Board: Electrical Schematic............................................................................................................... 77
Figure 4-11: Debug Board: Top View ................................................................................................................................ 78
Figure 4-12: Debug Board: Bottom View ........................................................................................................................... 78
Figure 4-13: Debug Board: Top Signal Layer .................................................................................................................... 79
Figure 4-14: Debug Board: Middle Layer 1 (Ground Plane) .............................................................................................. 79
Figure 4-15: Debug Board: Middle Layer 2 (Supply Plane) ............................................................................................... 80
Figure 4-16: Debug Board: Bottom Trace Layer ............................................................................................................... 80
Figure 4-17: TERIDIAN 71M6534H epLQFP100: Pinout (top view) .................................................................................. 83
List of Tables
Table 1-1: Jumper settings on Debug Board ..................................................................................................................... 13
Table 1-2: Straight cable connections ............................................................................................................................... 13
Table 1-3: Null-modem cable connections ........................................................................................................................ 13
Table 1-4: Selectable Display Parameters ........................................................................................................................ 14
Table 1-5: CE RAM Locations for Calibration Constants .................................................................................................. 27
Table 1-6: Flash Programming Interface Signals .............................................................................................................. 31
Table 1-7: MPU Input Parameters for Metering ................................................................................................................ 34
Table 1-8: Selectable Pulse Sources ................................................................................................................................ 35
Table 1-9: MPU Instantaneous Output Variables .............................................................................................................. 36
Table 1-10: MPU Status Word Bit Assignment.................................................................................................................. 37
Table 1-11: MPU Accumulation Output Variables ............................................................................................................. 38
Table 1-12: CLI Commands for MPU Data Memory .......................................................................................................... 39
Table 3-1: D6534T14A2 Demo Board Description ............................................................................................................ 61
Table 4-1: D6534T14A2 Demo Board: Bill of Material ...................................................................................................... 69
Table 4-2: Debug Board: Bill of Material ........................................................................................................................... 76
Page: 7 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Page: 8 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
1

1 GETTING STARTED

1.1 GENERAL

The TERIDIAN Semiconductor Corporation (TSC) 71M6534H Demo Board is a demonstration board for evaluating the 71M6534H device for 3-phase electronic power metering applications. It incorporates a 71M6534 or 71M6534H 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 71M6534 or 71M6534H energy meter chip for measurement accuracy and overall system use.
The board is pre-programmed with a Demo Program in the FLASH memory of the 71M6534/6534H IC. This em­bedded application is developed to exercise all low-level function calls to directly manage the peripherals, flash programming, and CPU (clock, timing, power savings, etc.).
The 71M6534/6534H IC on the Demo Board is pre-programmed with default calibration factors.

1.2 SAFETY AND ESD PRECAUTIONS

Connecting live voltages to the demo board system will result in potentially hazardous voltages on the demo board.
THE DEMO SYSTEM IS ESD SENSITIVE! ESD PRECAUTIONS SHOULD BE TAKEN WHEN HANDLING THE DEMO BOARD!
EXTREME CAUTION SHOULD BE TAKEN WHEN HANDLING THE DEMO BOARD ONCE IT IS CONNECTED TO LIVE VOLTAGES!

1.3 DEMO KIT CONTENTS

Demo Board D6534T14A2 with 71M6534H IC and pre-loaded demo program:
Debug Board
Two 5VDC/1,000mA universal wall transformers with 2.5mm plug (Switchcraft 712A compatible)
Serial cable, DB9, Male/Female, 2m length (Digi-Key AE1020-ND)
CD-ROM containing documentation (data sheet, board schematics, BOM, layout), Demo Code (sources
and executable), and utilities
The CD-ROM contains a file named readme.txt that describes all files found on the CD-ROM.
Page: 9 of 86
© 2005-2007 TERIDIAN Semiconductor Corporation
V2-0
71M6534H Demo Board User’s Manual

1.4 DEMO BOARD VERSIONS

At printing time of this document only the following version of the Demo Board is available:
Demo Board D6534T14A2 (standard)

1.5 COMPATIBILITY

This manual applies to the following hardware and software revisions:
71M6534 or 71M6534H chip revision A03
Demo Kit firmware revision 4p6q
Demo Boards D6534T14A2

1.6 SUGGESTED EQUIPMENT NOT INCLUDED

For functional demonstration:
PC w/ MS-Windows For software development (MPU code):
Signum ICE (In Circuit Emulator): ADM-51 – see update information in section 1.11
http://www.signum.com
®
versions XP, ME, or 2000, equipped with RS232 port (COM port) via DB9 connector
Keil 8051 “C” Compiler kit: CA51
http://www.keil.com/c51/ca51kit.htm
, http://www.keil.com/product/sales.htm

1.7 DEMO BOARD TEST SETUP

Figure 1-1 shows the basic connections of the Demo Board plus Debug Board with the external equipment for desktop testing, i.e. without live power applied. For desktop testing, both the Demo and Debug board may be powered with their 5VDC power supplies.
Page: 10 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Power (5VDC)
Demo Board
Two Power Supplies
(100VAC to 240VAC,
5V/1ADC Output)
Debug
Power 5VDC
Board
Host PC
Figure 1-1: TERIDIAN D6534T14A2 Demo Board with Debug Board: Basic Connections
The D6534T14A2 Demo Board block diagram is shown in Figure 1-2. 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 internal power supply. The Debug Board provides magnetic isolation from the meter and interfaces to a PC through a 9 pin serial port. For serial communication between the PC and the TERIDIAN 71M6534H, the Debug Board needs to be plugged with its connector J3 into connector J2 of the Demo Board.
Connections to the external signals to be measured, i.e. AC voltages and current signals derived from shunt resistors or current transformers, are provided on the rear side of the demo board (see Figure 3-1).
Caution: 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.
All input signals are referenced to the V3P3 (3.3V power supply to the chip).
Page: 11 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
DEMONSTRATION METER
External Current
Transformers
INEUTRAL
VC VB
VA
JP1
NEUTRAL
IA
IB
IC
V3P3
5V DC
battery
(optional)
On-board
components
powered by
V3P3D
PB
3.3v
JP8
GND
IDP
IDN
IAP IAN
IBP
IBN ICP
ICN
V3P3A
V3P3SYS
6534H
Single Chip
VA
Meter
VB VC
GND
VBAT
PB
V3P3D
DIO6/WPULSE
DIO8/XPULSE DIO7/RPULSE
DIO9/YPULSE
DIO4 DIO5
DIO56
DIO57
DIO58
TMUXOUT
CKTEST
PULSE OUTPUTS
TX
RX
GND
Wh
VARh
EEPROM
ICE Connector
1
2
3
10
12
5, 7, 9, 11
8
6
4
15, 16
N/C
13, 14
N/C
J2
V3P3SYS
V3P3SYS
3.3V LCD
DEBUG BOARD (OPTIONAL)
OPTO
OPTO
OPTO
OPTO
OPTO
6
V5_DBG
MPU HEARTBEAT (5Hz)
V5_DBG
CE HEARTBEAT (1Hz)
V5_DBG
GND_DBG
V5_DBG
RS-232
INTERFACE
OPTO
OPTO
5V DC
GND_DBG
JP21
DB9 to PC COM Port
RTM INTERFACE
FPGA
J5
68 Pin Connector to NI PCI-6534
DIO Board
V5_NI
05/23/2008
Figure 1-2: Block diagram for the TERIDIAN D6534T14A2 Demo Board with Debug Board
Page: 12 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual

1.7.1 POWER SUPPLY SETUP

There are several choices for meter power supply:
Internal (using phase A of the AC line voltage). The internal power supply is only suitable when phase A
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.

1.7.2 CABLE FOR SERIAL CONNECTION (DEBUG BOARD)

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-1.
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
Page: 13 of 86
© 2005-2007 TERIDIAN Semiconductor Corporation
V2-0
71M6534H Demo Board User’s Manual

1.7.3 CHECKING OPERATION

A few seconds after power up, the LCD display on the Demo Board should display this brief greeting:
H E L L 0
The “HELLO” message should be followed by the display of accumulated energy alternating with the text “Wh”.
3. 0. 0 0 1
W h
If the PB switch on the Demo Board is pressed and held down), the display will cycle through a series of parameters, as shown in Table 1-4.
Step
Displayed
Text
1
DELTA C
2
3
4
5
6
7
8
9
HZ
Wh
Wh
VARh
VARh
VAh
HOURS
TIME
Once, the Debug Board is plugged into J2 of the Demo Board, LED DIO1 on the Debug Board will flash with a frequency of 1Hz, indicating CE activity. The LED DIO0 will flash with a frequency of 5Hz, indicating MPU activity.
Deviation from nominal temperature [°C]
Line frequency [Hz] 11
Accumulated real energy [Wh]
Exported real energy [Wh] 13
Accumulated reactive energy [VARh]
Exported reactive energy [VARh]
Accumulated apparent energy [VARh]
Hours of operation since last reset [1/100 h]
Real time from RTC [hh.mm.ss]
Description Step
10
12
14
15
16
17
Table 1-4: Selectable Display Parameters
--
Displayed
Text
DATE
PF
EDGES
PULSES
A
V
VBAT
--
Description
Date from RTC [yyyy.mm.dd]
Power factor, calculated from current Wh/VAh
Accumulated pulses
Current
Voltage
Battery voltage
--
Page: 14 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual

1.7.4 SERIAL CONNECTION SETUP

After connecting the DB9 serial port to a PC, start the HyperTerminal application and create a session using the following parameters:
Port Speed: 9600 bd or 300bd, depending on jumper JP16 (see section 3.1) Data Bits: 8 Parity: None Stop Bits: 1 Flow Control: XON/XOFF
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. Port speed and flow control are configured under the General tab (Figure 1-4, left), bit settings are configured by pressing the Configure button (Figure 1-5, right), as shown below. 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.
Port parameters can only be adjusted when the co nnection is not active. The disconnect
button, as shown in Figure 1-3 must be clicked in order to disconnect the port.
Figure 1-3: Hyperterminal Sample Window with Disconnect Butto n (Arrow)
Page: 15 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Figure 1-4: Port Speed and Handshake Setup (left) and Port Bit setup (right)
Once, the connection to the demo board is established, press <CR> and the prompt, >, should appear. Type >? to see the Demo Code help menu. Type >i to verify the Demo Code revision.

1.8 USING THE DEMO BOARD

The 71M6534/6534H Demo Board is a ready-to-use meter prepared for use with external current transformers.
Using the Demo Board involves communicating with the Demo Code via the command line interface (CLI). The CLI allows modifications to the metering parameters, access to the EEPROM, initiation of auto-cal sequences, selection of the displayed parameters, changing of calibration factors and more operations that can be used to evaluate the 71M6534 chip.
Before evaluating the 71M6534/6534H on the 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.8.1.
Page: 16 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual

1.8.1 SERIAL COMMAND LANGUAGE

The Demo Code residing in the flash memory of the 71M6534/6534H provides a convenient way of examining and modifying key meter parameters. Once the Demo Board is connected to a PC or terminal per the instructions given in Section 1.7.2 and 1.7.4, typing ‘?’ will bring up the list of commands shown in Figure 1-5.
Figure 1-5: Command Line Help Display
The tables in this chapter describe the commands in detail.
Page: 17 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Commands to Display Help on the CLI Commands:
? HELP
Description: Command help available for each of the options below.
Command
combinations:
?] Display help on access CE data RAM
?) Display help on access MPU RAM
?, Display help on repeat last command
?/ Display help on ignore rest of line
?C Display help on compute engine control.
?CL Display help on calibration.
?EE Display help on EEPROM control
?ER Display help on error recording
?I Display help on information message
?M Display help on meter display control
?MR Display help on meter RMS display control
?R Display help on SFR control
?RT Display help on RTC control
?T Display help on trim control
?W Display help on the wait/reset command
?Z Display help on reset
Examples: ?? Display the command line interpreter help menu.
?C Displays compute engine control help.
Commands for CE Data Access:
? Command line interpreter help menu.
Comment
] CE DATA ACCESS Comment
Description: Allows user to read from and write to CE data space.
Usage: ] [Starting CE Data Address] [option]…[option]
Command
combinations:
]A$$$
]A=n=n
]U Update default version of CE Data in flash memory
Example: ]40$$$ Reads CE data words 0x40, 0x41 and 0x42.
]7E=12345678=9876ABCD Writes two words starting @ 0x7E
All CE data words are in 4-byte (32-bit) format. Typing ]A? will access the 32-bit word located at the byte address 0x1000 + 4 * A = 0x1028.
Page: 18 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
]A???
Read consecutive 16-bit words in Decimal, starting at address A
Read consecutive 16-bit words in Hex, starting at address A
Write consecutive memory values, starting at address A
71M6534H Demo Board User’s Manual
Commands for MPU/XDATA Access:
) MPU DATA ACCESS Comment
Description: Allows user to read from and write to MPU data space.
Usage: ) [Starting MPU Data Address] [option]…[option]
Command
)A???
combinations:
)A$$$
Read three consecutive 32-bit words in Decimal, starting at address A
Read three consecutive 32-bit words in Hex, starting at address A
)A=n=m
Write the values n and m to two consecutive addresses starting at address A
?) Display useful RAM addresses.
Example: )08$$$$ Reads data words 0x08, 0x0C, 0x10, 0x14
)04=12345678=9876ABCD Writes two words starting @ 0x04
MPU or XDATA space is the address range for the MPU XRAM (0x0000 to 0xFFF). All MPU data words 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 Dollar signs (“$$”), typing question marks will display negative decimal values if the most significant bit is set.
Commands for DIO RAM (Configuration RAM) and SFR Control:
R DIO AND SFR CONTROL Comment
Description: Allows the user to read from and write to DIO 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
Ra???...
Read consecutive SFR registers in Decimal, starting at address a
Ra$$$...
Read consecutive registers in Hex, starting at address a
Ra=n=m…
Set values of consecutive registers to n and m starting at address a
Example: RI2$$$ Read DIO RAM registers 2, 3, and 4 in Hex.
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 71M6534/6534H 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.
Page: 19 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Commands for EEPROM Control:
EE EEPROM CONTROL Comment
Description: Allows user to enable read and write to EEPROM.
Usage: EE [option] [arguments]
Command
combinations:
EERa.b Read EEPROM at address 'a' for 'b' bytes.
EESabc..xyz Write characters to buffer (sets Write length)
EETa Transmit buffer to EEPROM at address 'a'.
EEWa.b...z Write values to buffer
CLS Saves calibration to EEPROM
Example:
Due to buffer size restrictions, the maximum number of bytes handled by the EEPROM command is 0x40.
EECn EEPROM Access (1 Æ Enable, 0 Æ Disable)
EEShello
EET$0210
Writes 'hello' to buffer, then transmits buffer to
EEPROM starting at address 0x210.
Auxiliary 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 CE DRAM address for the temperature (0x40).
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.
Commands controlling the CE, TMUX and the RTM:
C COMPUTE ENGINE
CONTROL
Description: Allows the user to enable and configure the compute engine.
Usage: C [option] [argument]
Command
combinations:
CTn
CREn RTM output control (1 Æ Enable, 0 Æ Disable)
CRSa.b.c.d Selects CE addresses for RTM output
Example: CE0
CT3 Selects the VBIAS signal for the TMUX output pin
CEn
Comment
Compute Engine Enable (1 Æ Enable, 0 Æ Disable)
Select input n for TMUX output pin. n is interpreted as a decimal number.
Disables CE, followed by “CE OFF” display on LCD. The Demo Code will reset if the WD timer is enabled.
Page: 20 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Commands controlling the Auto-Calibration Function:
CL AUTO-CALIBRATION
Comment
CONTROL
Description: Allows the user to initiate auto-calibration and to store calibration values.
Usage: CL [option]
Command
combinations:
CLB
Begin auto-calibration. Prior to auto-calibration, the calibration coefficients are automatically restored from flash memory.
CLS
Save calibration coefficients to EEPROM starting at address 0x0004
CLR Restore calibration coefficients from EEPROM
CLD Restore coefficients from flash memory
Example: CLB Starts auto-calibration and saves data automatically.
Before starting the auto-calibration process, target values for voltage, duration and current must be entered in MPU RAM (see section 1.9.5), and the target voltage and current must be applied constantly during calibration. Calibration factors can be saved to EEPROM using the CLS command.
Commands controlling the Pulse Counter Function
CP PULSE-COUNT CONTROL Comment
Description: Allows the user to control the pulse count functions.
Usage: CP [option]
Command
combinations:
CPA
Start pulse counting for time period defined with the CPD command. Pulse counts will display with commands M15.2, M16.2
CPC
Clear the absolute pulse count displays (shown with commands M15.1, M16.1)
CPDn
Set time window for pulse counters to n seconds, n is interpreted as a decimal number.
Example: CPD60 Set time window to 60 seconds.
Pulse counts accumulated over a time window defined by the CPD command will be displayed by M15.2 or M16.2 after
Commands M15.1 and M16.1 will display the absolute
zero with the CPC command (or the XRAM write )1=2). Commands M15.2 and M16.2 will display the number of pulses counted during the interval defined by the CPD command. These displays are reset only after a new reading, as initiated by the CPA command.
the defined time has expired.
pulse count for the W and VAR outputs. These displays are reset to
Commands for Identification and Information:
I INFORMATION MESSAGES Comment
Description: Allows user to read information messages.
Usage: I Displays complete version information
The I command is mainly used to identify the revisions of Demo Code and the contained CE code.
Commands for Controlling the RMS Values Shown on the LCD Display:
MR METER RMS DISPLAY Comment
Page: 21 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
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.3 Displays phase C RMS current.
Phase 4 is the measured neutral current.
No error message is issued when an invalid parameter is entered, e.g. MR1.8.
Commands for Controlling the MPU Power Save Mode:
PS POWER SAVE MODE Comment
Description: Enters power save mode
Usage: PS
Return to normal mode is achieved by resetting the MPU (Z command).
Commands for Controlling the RTC:
MR1. [phase] Displays instantaneous RMS current
Disables CE, ADC, CKOUT, ECK, RTM, SSI, TMUX
VREF, and serial port, sets MPU clock to 38.4KHz.
RT REAL TIME CLOCK
CONTROL
Description: Allows the user to read and set the real time clock.
Usage: RT [option] [value] … [value]
Command
combinations:
RTR Read Real Time Clock.
RTTh.m.s Time of day: (hr, min, sec).
RTAs.t
Example: RTD05.03.17.5 Programs the RTC to Thursday, 3/17/2005
RTA1.+1234 Speeds up the RTC by 1234 PPB.
The “Military Time Format” is used for the RTC, i.e. 15:00 is 3:00 PM.
RTDy.m.d.w: Day of week
Comment
(year, month, day, weekday [1 = Sunday]). If the weekday is omitted it is set automatically.
Real Time Adjust: (start, trim). Allows trimming of the RTC. If s > 0, the speed of the clock will be adjusted by ‘t’ parts per billion (PPB). If the CE is on, the value entered with 't' will be changing with temperature, based on Y_CAL, Y_CALC and Y_CALC2.
Page: 22 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Commands for Accessing the Trim Control Registers:
T TRIM CONTROL Comment
Description: Allows user to read trim and fuse values.
Usage: T [option]
Command
T4 Read fuse 4 (TRIMM).
combinations:
T5 Read fuse 5 (TRIMBGA)
T6 Read fuse 6 (TRIMBGB).
Example: T4 Reads the TRIMM fuse.
These commands are only accessible for the 71M6534H (0.1%) parts. When used on a 71M6534 (0.5%) part, the results will be displayed as zero.
Reset Commands:
W RESET Comment
Description: Watchdog control
Usage: W
Halts the Demo Code program, thus suppressing the triggering of the hardware watchdog timer. This will cause a reset, if the watchdog timer is enabled.
Page: 23 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
Commands for Controlling the Metering Values Shown on the LCD Display:
M METER DISPLAY
CONTROL (LCD)
Description: Allows user to select internal variables to be displayed.
Usage: M [option]. [option]
Command
combinations:
M0 Wh Total Consumption (display wraps around at 999.999)
M1 Temperature (C° delta from nominal)
M2 Frequency (Hz)
M3. [phase] Wh Total Consumption (display wraps around at 999.999)
M4. [phase] Wh Total Inverse Consumption (display wraps around at 999.999)
M5. [phase] VARh Total Consumption (display wraps around at 999.999)
M6. [phase]
M7. [phase] VAh Total (display wraps around at 999.999)
M8 Operating Time (in hours)
M9 Real Time Clock
M10 Calendar Date
M11. [phase] Power factor
M13 Mains edge count for the last accumulation interval
M13.1
M13.2 CE main edge count for the last accumulation interval
M14.1 Absolute count for W pulses. Reset with CPC command.
M14.2 Count for W pulses in time window defined by the CPD command.
M15.1 Absolute count for VAR pulses. Reset with CPC command.
M15.2 Count for W pulses in time window defined by the CPD command.
Example: M3.3 Displays Wh total consumption of phase C.
M5.0 Displays VARh total consumption for all phases.
Displays for total consumption wrap around at 999.999Wh (or VARh, VAh) due to the limited
number of available display digits. Internal registers (counters) of the Demo Code are 64 bits wide and do not wrap around.
M Wh Total Consumption (display wraps around at 999.999)
Comment
VARh Total Inverse Consumption (display wraps around at
999.999)
Main edge count (accumulated) – zero transitions of the input signal
When entering the phase parameter, use 1 for phase A, 2 for phase B, 3 for phase C, and 0 or blank for all phases.
Page: 24 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual

1.8.2 USING THE DEMO BOARD FOR ENERGY MEASUREMENTS

The 71M6534/6534H Demo Board was designed for use with current transformers (CT).
The Demo Board may immediately be used with current transformers having 2,000:1 winding ratio and is programmed for a Kh factor of 3.2 and (see Section 1.8.4 for adjusting the Demo Board for transformers with different turns ratio).
Once, voltage is applied and load current is flowing, the red LED D5 will flash each time an energy sum of 3.2 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 3.2 VARh is collected. The LCD display will show the accumulated energy in VARh when set to display mode 5 (command
>M3 via the serial interface).
>M5 via the serial interface).

1.8.3 ADJUSTING THE KH FACTOR FOR THE DEMO BOARD

The 71M6534/6534H Demo Board is shipped with a pre-programmed scaling factor Kh of 3.2, i.e. 3.2Wh per pulse. In order to be used with a calibrated load or a meter calibration system, the board should be connected to the AC power source using the spade terminals on the bottom of the board. The current transformers should be connected to the dual-pin headers on the bottom of the board. The connection is the same for single-ended or differential mode. See chapter 3.1 for proper jumper settings.
The Kh value can be derived by reading the values for IMAX and VMAX (i.e. the RMS current and voltage values that correspond to the 250mV maximum input signal to the IC), and inserting them in the following equation for Kh:
Kh = IMAX * VMAX * 66.1782 / (In_8 * WRATE * N
The small deviation between the adjusted Kh of 3.19902 and the ideal Kh of 3.2 is covered by calibration. The default values used for the 71M6534/6534H Demo Board are:
WRATE: 171
IMAX: 208 VMAX: 600 In_8: 1 (controlled by IA_SHUNT = -15)
N
: 2520
ACC
X: 6
Explanation of factors used in the Kh calculation:
* X) = 3.19902 Wh/pulse.
ACC
WRATE: The factor input by the user to determine Kh IMAX: The current input scaling factor, i.e. the input current generating 176.8mVrms at the IA/IB/IC
input pins of the 71M6534. 176.8mV rms is equivalent to 250mV peak.
VMAX: The voltage input scaling factor, i.e. the voltage generating 176.8mVrms at the VA/VB/VC
input pins of the 71M6534
In_8: The setting for the additional ADC gain (8 or 1) determined by the CE register IA_SHUNT
: The number of samples per accumulation interval, i.e. PRE_SAMPS *SUM_CYCLES
N
ACC
X: The pulse rate control factor determined by the CE registers
PULSE_SLOW and
PULSE_FAST
Almost any desired Kh factor can be selected for the Demo Board by resolving the formula for WRATE:
WRATE = (IMAX * VMAX * 66.1782) / (Kh * In_8 * N
For the Kh of 3.2Wh, the value 171 (decimal) should be entered for command
>]21=+171).
* X)
ACC
WRATE at CE location 0x21 (using the CLI
Page: 25 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
1.8.4 ADJUSTING THE DEMO BOARDS TO DIFFERENT CURRENT TRANS­FORMERS
The Demo Board is prepared for use with 2000:1 current transformers (CTs). This means that for the un­modified Demo Board, 208A on the primary side at 2000:1 ratio result in 104mA on the secondary side, causing
176.8mV at the 1.7Ω resistor pairs R24/R25, R36/R37, R56/R57 (2 x 3.4Ω in parallel).
In general, when
IMAX is applied to the primary side of the CT, the voltage V
at the IA, IB, or IC input of the
in
71M6534 IC is determined by the following formula:
= R * I = R * IMAX/N
V
in
where N = transformer winding ratio, R = resistor on the secondary side
If, for example, if the current corresponding to
IMAX = 208A is applied to a CT with a 2500:1 ratio, only 83.2mA
will be generated on the secondary side, causing only 141mV of voltage drop.
The steps required to adapt a 71M6534 Demo Board to a transformer with a winding ratio of 2500:1 are outlined below:
1) The formula R
= 176.8mV/(IMAX/N) is applied to calculate the new resistor R
x
. We calculate Rx to 2.115Ω
x
2) Changing the resistors R24/R25, R106/R107 to a combined resistance of 2.115Ω (for each pair) will
cause the desired voltage drop of 176.8mV appearing at the IA, IB, or IC inputs of the 71M6534 IC.
Simply scaling IMAX is not recommended, since peak voltages at the 71M6534 inputs should always be in the
range of 0 through ±250mV (equivalent to 176.8mV rms). If a CT with a much lower winding ratio than 1:2,000 is used, higher secondary currents will result, causing excessive voltages at the 71M6534 inputs. Conversely, CTs with much higher ratio will tend to decrease the useable signal voltage range at the 71M6534 inputs and may thus decrease resolution.

1.8.5 ADJUSTING THE DEMO BOARDS TO DIFFERENT VOLTAGE DIVIDERS

The 71M6534 Demo Board comes equipped with its own network of resistor dividers for voltage measurement mounted on the PCB. The resistor values are 2.5477MΩ (for channel A, R15-R21, R26-R31 combined) and 750Ω (R32), resulting in a ratio (R
600V. A large value for VMAX has been selected in order to have headroom for overvoltages. This choice need
not be of concern, since the ADC in the 71M6534 has enough resolution, even when operating at 120Vrms. If a different set of voltage dividers or an external voltage transformer (potential transformer) is to be used,
scaling techniques similar to those applied for the current transformer should be used.
In the following example we assume that the line voltage is not applied to the resistor divider for VA formed by R15-R21, R26-R31, and R32, but to a voltage transformer with a ratio N of 20:1, followed by a simple resistor
divider. We also assume that we want to maintain the value for VMAX at 600V to provide headroom for large
voltage excursions.
) of 1:3,393.933. This means that VMAX equals 176.78mV*3,393.933 =
R
When applying
V
is scaled by the resistor divider ratio RR. When the input voltage to the voltage channel of the 71M6534 is the
s
desired 176.8mV, V
Resolving for R
VMAX at the primary side of the transformer, the secondary voltage V
V
= VMAX / N
s
is then given by:
s
V
= RR * 176.8mV
s
, we get:
R
R
= (VMAX / N) / 176.8mV = (600V / 30) / 176.8mV = 170.45
R
is:
s
This divider ratio can be implemented, for example, with a combination of one 16.95kΩ and one 100Ω resistor.
Page: 26 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
71M6534H Demo Board User’s Manual
If potential transformers (PTs) are used instead of resistor dividers, phase shifts will be introduced that will re­quire negative phase angle compensation. TERIDIAN Demo Code accepts negative calibration factors for phase.

1.9 CALIBRATION PARAMETERS

1.9.1 GENERAL CALIBRATION PROCEDURE

Any calibration method can be used with the 71M6534/6534H chips. This Demo Board User’s Manual presents calibration methods with three or five measurements as recommended methods, because they work with most manual calibration systems based on counting "pulses" (emitted by LEDs on the meter).
Naturally, a meter in mass production will be equipped with special calibration code offering capabilities beyond those of the Demo Code. It is basically possible to calibrate using voltage and current readings, with or without pulses involved. For this purpose, the MPU Demo Code can be modified to display averaged voltage and current values (as opposed to momentary values). Also, automated calibration equipment can communicate with the Demo Boards via the serial interface and extract voltage and current readings. This is possible even with the unmodified Demo Code.
A complete calibration procedure is given in section 2.2 of this manual.
Regardless of the calibration procedure used, parameters (calibration factors) will result that will have to be applied to the 71M6534/6534H chip in order to make the chip apply the modified gains and phase shifts necessary for accurate operation. Table 1-5 shows the names of the calibration factors, their function, and their location in the CE RAM.
Again, the command line interface can be used to store the calibration factors in their respective CE RAM addresses. For example, the command
>]10=+16302
stores the decimal value 16302 in the CE RAM location controlling the gain of the current channel (CAL_IA) for
phase A.
The command
>]11=4005
stores the hexadecimal value 0x4005 (decimal 16389) in the CE RAM location controlling the gain of the
voltage channel for phase A (CAL_VA).
CE
Constant
CAL_VA CAL_VB
CAL_VC
CAL_IA CAL_IB CAL_IC
PHADJ_A PHADJ_B
PHADJ_C
Page: 27 of 86 © 2005-2007 TERIDIAN Semiconductor Corporation V2-0
Address
(hex)
0x11 0x13 0x15
0x10 0x12 0x14
0x18 0x19
0x1A
Table 1-5: CE RAM Locations for Calibration Constants
Description
Adjusts the gain of the voltage 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%.
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%.
This constant controls the CT phase compensation. No compensation occurs when PHADJ=0. As PHADJ is increased, more compensation is introduced.
Loading...
+ 60 hidden pages