Maxim Integrated 6613-PSU-1+1S-URT-v1-00 User Manual

USER GUIDE
A Maxim Integrated Products Brand
6613_PSU_1+1S_URT_v1_00
Firmware Description Document
October 29, 2010
Rev. 1.0
UG_6613_040
6613_PSU_1+1S_URT_V1_00 Firmware Description Document UG_6613_040
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time.
Maxim Integr ated Products, 12 0 San Gabriel Drive, Sun nyvale, CA 94086 408- 737-7600
2010 Maxim Integrated Products Maxim is a registered trademark of Maxim Integrated Products.
UG_6613_ 040 6613_PSU_1+1S_URT_V1_00 Firmware Description Document
Table of Contents
1 Introduction ......................................................................................................................................... 5
2 Measurement Description .................................................................................................................. 6
2.1 Basic Measurement Equations ..................................................................................................... 6
2.2 Sample Rate and Accumulation Interval ...................................................................................... 6
3 Serial Communication ........................................................................................................................ 7
4 Auto-reporting Mode .......................................................................................................................... 7
5 Auto-reporting “Toggle” Command .................................................................................................. 7
6 Command Line Interface .................................................................................................................... 8
6.1 Identification and Information Commands .................................................................................... 8
6.2 Reset Commands ......................................................................................................................... 8
6.3 MPU Data Access Command ....................................................................................................... 9
6.3.1 Individual Address Read .................................................................................................. 9
6.3.2 Consecutive Read ........................................................................................................... 9
6.3.3 Block Reads ................................................................................................................... 10
6.3.4 Concatenated Reads ..................................................................................................... 10
6.3.5 U Command ................................................................................................................... 10
6.4 Auxiliary Commands ................................................................................................................... 12
6.4.1 Repeat Command .......................................................................................................... 12
6.5 Calibration Commands ............................................................................................................... 13
6.5.1 Complete Calibration Command (“Single Command Calibration”) ................................ 13
6.5.1.1 CAL Command ................................................................................................ 13
6.5.1.2 CALW Command ............................................................................................ 13
6.5.2 Atomic Calibration Commands ...................................................................................... 14
6.5.2.1 CLV Command ................................................................................................ 14
6.5.2.2 CLI Command ................................................................................................. 14
6.5.2.3 CLP Command ................................................................................................ 14
6.5.2.4 CLT Command ................................................................................................ 15
6.6 CE Data Access Commands ...................................................................................................... 15
6.6.1 Single Register CE Access ............................................................................................ 15
6.6.2 Consecutive CE Reads .................................................................................................. 16
6.6.3 CE Data Write ................................................................................................................ 16
6.6.4 U Command ................................................................................................................... 16
6.7 CE Control Commands ............................................................................................................... 18
6.7.1 Disable CE Command ................................................................................................... 18
6.7.2 Turn On CE Command .................................................................................................. 18
7 MPU Measurement Outputs ............................................................................................................. 19
8 Configuration Parameter Entry........................................................................................................ 23
8.1 MPU Parameters ........................................................................................................................ 23
8.2 CE Parameters ........................................................................................................................... 29
9 Address Content Summary.............................................................................................................. 31
10 Digital IOs .......................................................................................................................................... 34
11 Contact Information .......................................................................................................................... 34
Document Revision History ..................................................................................................................... 35
Rev. 1.0 3
6613_PSU_1+1S_URT_V1_00 Firmware Description Document UG_6613_040
Tables
Table 1: Measurement Equations Definitions ............................................................................................... 6
Table 2: MPU Outputs Table 3: MPU Parameters Table 4: CE Parameters Table 5: MPU Output Summary Chart Table 6: MPU Input Summary Chart Table 7: CE Input Summary Chart
................................................................................................................................. 19
........................................................................................................................... 23
.............................................................................................................................. 29
........................................................................................................ 31
........................................................................................................... 32
.............................................................................................................. 33
4 Rev. 1.0
UG_6613_ 040 6613_PSU_1+1S_URT_V1_00 Firmware Description Document
Shunt
NEUTRAL
LINE
A0
A3
750
1M 1M
1000pF
A1
1000pF
A2
LOAD
750
78M6613
V3P3
1
4
3
2
INLET
17
DIO14, 17
SAG, ALARM
6
XIN
XOUT
8
GNDA
GND
V3P3D
V3P3A
23
31
16
32
V3P3
TX
RX
UART_TX14
19
UART_RX
1 Introduction
This document describes the 6613_PSU_1+1S_URT_v1_00 firmware, which is used with the Teridian 78M6613 power and energy measurement IC. This firmware provides simple methods for calibration and access to measurement data such as Instantaneous Power, Voltage, Current, Power Factor, and Line Frequency. It is specifically optimized for measurement in single phase AC Power Supplies and appliances with the following key features:
Optimized for using current shunt resistors with analog input A0 configured as single-ended Voltage input and input A1 configured as single-ended Current input. Inputs A2 and A3 unused.
Phase error calibration routine included for maintaining accuracy over non-ideal power factors (optional).
Accumulation or averaging intervals based on fixed number of AC-cycles for compliance with latest PMBus1.2 recommendations.
Low-latency SAG status pin for sub-cycle AC fault detection.
Dual mode host interface (Auto-Reporting or Command Line Interface).
All measurement calculations are computed by the 78M6613 and communicated to the host processor over a serial interface (UART0) on the TX and RX pins of the 78M6613 device. Digital IOs utilized by this firmware include:
DIO17 is a SAG status pin updated every MUX cycle.
DIO14 is a configurable alarm pin updated every accumulation interval.
Figure 1 shows a simplified connection diagram of the 78M6613 (emulator connections, decoupling capacitors and 3.3VDC power supply are omitted in this diagram).
Figure 1: 78M6613 Simplified Connection Diagram for 6613_PSU_1+1S_URT_v1_00 Firmware
Rev. 1.0 5
6613_PSU_1+1S_URT_V1_00 Firmware Description Document UG_6613_040

2 Measurement Description

2.1 Basic Measurement Equations

The Teridian 78M6613 with firmware 6613_PSU_1+1S_URT_v1_00 provides the user with measurement data referred to as “Wideband” (WB). Wideband measurements are generally of interest when measuring non-sinusoidal current/voltage, a typical condition in switched mode power supplies or similar systems.
Table 1: Measurement Equations Definitions
Symbol Parameter Wideband Equation
V RMS Voltage
I RMS Current
P Active Power Q
S
PF Power Factor P/S PA Phase Angle ACOS (P/S)
Reactive
Power
Apparent
Power
V = √∑
I = √∑
P =
Q = √(S
S = V * I
The measurement outputs are continuously available to the user. To obtain measurement outputs, the serial UART interface between the 78M6613 and the host processor must be set up and is described in
Section 3.

2.2 Sample Rate and Accumulation Interval

2
v(t)
2
i(t)
(i(t) * v(t))
2
– P2)
This firmware utilizes an effective sampling rate of 6554 samples per second for each input. The values described in section 2.1 are calculated over a period commonly referred as accumulation
interval. The registers containing the measurements are updated at the completion of every accumulation time. In firmware 6613_PSU_1+1S_URT_v1_00, the accumulation interval is based on multiples of the Input Voltage AC cycle. For example if the accumulation interval is set to 30AC cycles, at 50Hz line frequency, it will result in 20ms * 30 = 600ms. In this case the RMS values will be calculated over 3932 samples.
Accumulation interval can be changed in CLI mode by the following command (see Secti on 6 for details of the CLI commands):
> ]18=+30 (Changes accumulation interval to 30 AC cycles)
6 Rev. 1.0
UG_6613_ 040 6613_PSU_1+1S_URT_V1_00 Firmware Description Document

3 Serial Communication

The serial communication with the 78M6613 takes place over a UART (UART0) interface. The default settings for the UART of the 78M6613, as implemented in this firmware, are given below:
Baud Rate: 38400bps Data Bits: 8 Parity: None Stop Bits: 1 Flow Control: Xon/Xoff
The firmware allows two types of communication protocols (modes) through UART0: CLI (Command Line Interface) mode and auto-report mode (default operation).

4 Auto-reporting Mode

Upon application of 3.3VDC power, the 78M6613 will operate in Auto-reporting mode. Data Packet : Auto-reported AC measurement data packet consisting of Voltage, Current, Watt, Power
Factor and Line Frequency send every accumulation cycle. Measurement data packet is send over UART in ASCII format followed by line feed and carriage return.
Vrms Irms Watts PF Freq LF + CR
Measurement Parameter: The following table lists the measurement parameters and their respective bit resolutions (LSB) that is sent over UART in ASCII format.
Measurement Parameter Resolution (LSB) Voltage (Vrms) mV Current (Irms) mA Active Power(Watts) mW Power Factor(PF) Range between 0 and 1000.
1000 indicative of 1.0 PF
Line Frequency(Freq) 0.01 Hz

5 Auto-reporting “Toggle” Command

To change from Auto-reporting mode to CLI mode (see Section 6 for details of the CLI mode), Ctrl Z command must be sent from the host to the 78M6613 over the UART interface. A subsequent Ctrl Z command will cause the 78M6613 to toggle back to Auto-Reporting mode.
Rev. 1.0 7
6613_PSU_1+1S_URT_V1_00 Firmware Description Document UG_6613_040

6 Command Line Interfac e

The 6613_PSU_1+1S_URT_v1_00 firmware implements an instruction set called the Command Line Interface (CLI), which facilitates communication via UART between the 78M6613 and the host processor.

6.1 Identification and Information Commands

The I command is used to identify the revisions of the 6613_PSU_1+1S_URT_v1_00 firmware code and the embedded CE code. The host sends the I command to the 78M6613 as follows:
><CR> The 78M6613 will reply the following: TSC 78M6613 PSU 1+1S URT V1.00,Oct 15 2010(c) 2010 Teridian Semiconductor Corp.
All Rights Reserved CEVI4ACF0 >

6.2 Reset Commands

A soft reset of the 78M6613 can be performed by using the Z command. The soft reset restarts code execution at addr 0000 and does not alter flash contents. To issue a soft reset to the 78M6613, the host sends the following:
>Z<CR> The W command acts like a hardware reset. The energy accumulators in XRAM will retain their values.
Z Reset
Description: Allows the user to cause soft resets. Usage: Z Soft reset.
W Simulates watchdog reset.
8 Rev. 1.0
UG_6613_ 040 6613_PSU_1+1S_URT_V1_00 Firmware Description Document

6.3 MPU Data Access Command

All the measurement calculations are stored in the MPU data addresses of the 78M6613. The host requests measurement information using the MPU data access command which is a right parenthesis
) To request information, the host sends the MPU data access command, the address (in hex) which is
requested, the format in which the data is desired (Hex or Decimal) and a carriage return. The contents of the addresses that would be requested by the host are contained in Section 7.

6.3.1 Individual Address Read

The host can request the information in hex or decimal format. $ requests information in hex, and ? requests information in decimal. When requesting information in decimal, the data is preceded by a + or a -. The exception is )AB? which returns a string (see Table 3, MPU location address 0xAB).
An example of a command requesting the measured power in Watts (located at address 0x08) in decimal is as follows:
>)08?<CR> An example of a command requesting the measured power in Watts (located at address 0x08) in hex is
as follows: >)08$<CR>

6.3.2 Consecutive Read

The host can request information from consecutive addresses by adding additional ? for decimal or additional $ for hex.
An example of requests for the contents in decimal of ten consecutive addresses starting with 0x12 is: >)12??????????<CR> An example of requests for the contents in hex of ten consecutive addresses starting with 0x12 would be: >)12$$$$$$$$$$<CR> Note: The number of characters per line is limited to no more than 60.
Rev. 1.0 9
6613_PSU_1+1S_URT_V1_00 Firmware Description Document UG_6613_040

6.3.3 Block Reads

The block read command can also be used to read consecutive registers: )saddr:eaddr? For decimal format or )saddr:eaddr$ for hex format where saddr is the start address and eaddr is the final address.
The following block read command requests the information contained in Table 2 in decimal format: >)20:3D?<CR>

6.3.4 Concatenated Reads

Multiple commands can also be added on a single line. Requesting information in decimal from two locations and the block command from above are given below:
>)12?)15?)20:3D?<CR> Note: The number of characters per line is limited to no more than 60.

6.3.5 U Command

The U command is used for updating default values of the MPU Data permanently in the flash. Before issuing the U command, CE must first be turned off by the disable CE command. An example of a U command is as follows:
>)U Additional examples of MPU Data Access commands are provided in the following table:
) MPU Data Access
Description: Allows user to read from and write to MPU data space. Usage: ) {Starting MPU Data Address} {option}…{option}<CR> Command
Combinations:
)saddr? <CR> Read the register in decimal. )saddr?? <CR> Read two consecutive registers in decimal. )saddr???<CR> Read three consecutive registers in decimal.
)saddr:eaddr?
Block read command in decimal format. Read consecutive registers starting with starting address saddr and ending with addres s eaddr.
Results given in decimal. )saddr$<CR> Read the register word in h ex. )saddr$$ <CR> Read two consecutive register words in hex. )saddr$$$<CR> Read three consecutive register words in hex.
)saddr:eaddr$
Block read command in hex format. Read
consecutive registers starting with starting
address saddr and ending with addres s eaddr.
Results given in hex. )saddr=n<CR> Write the value n to address saddr in hex format. )saddr=n=m<CR> Write the values n and m to two consecutive
addresses starting at saddr in hex format. )saddr=+n<CR> Write the value n to address saddr in decim al
format. )saddr=+n=+m<CR> Write the values n and m to two consecutive
addresses starting at saddr in decimal format.
10 Rev. 1.0
UG_6613_ 040 6613_PSU_1+1S_URT_V1_00 Firmware Description Document
)U<CR>
Updates the default values of the MPU Data
permanently in the flash.
Examples: )08$<CR> Reads data word at MPU address location 0x08
in hex format. )08$$<CR> Reads data words at MPU address location
0x08, 0x09 in hex format. )08$$$<CR> Reads data words at MPU address location
0x08, 0x09, 0x0A in hex format. )28:4D$ Read data words in hex. )08?<CR> Reads data word at MPU address location 0x08
in decimal format. )08??<CR> Reads data words at MPU address location
0x08, 0x09 in decimal format. )08???<CR> Reads data words at MPU address location
0x08, 0x09, 0x0A in decimal format. )28:4D? Read data words at MPU a ddres s locatio n
starting 0x28 to 0x4D in decimal. )04=12345678<CR> Writes 0x12345678 to MPU address location
0x04 in the hex format. )04=12345678=9876ABCD<CR> Writes 0x12345678 to MPU address location
0x04 and 0x9876ABCD at MPU address location
0x05 in the hex format. )04=+123<CR> Writes 123 to MPU address location 0x04 in the
decimal format. )04=+123=-334<CR> Writes 123 to MPU address location 0x04 and
-334 to MPU address location 0x05 in the
decimal format.
Rev. 1.0 11
Loading...
+ 24 hidden pages