3 Getting Started with the SDK ............................................................................................................. 9
3.1 Required Hardware and Software Development Tools ................................................................ 9
3.1.1 Running the PDU1 Application Software .......................................................................... 9
3.1.2 Modifying the Application Code ......................................................................................... 9
3.2 Opening the Project with Keil uVision Tools ................................................................................. 9
3.3 Rebuilding the Application .......................................................................................................... 10
3.3.1 Without the Boot Loader .................................................................................................. 10
3.3.2 With the Boot Loader and CRC ....................................................................................... 10
3.4 Downloading the *.abs File to the Target ................................................................................... 11
4 Getting Started with Flash Programmin g ....................................................................................... 12
4.1 Via the GUI ................................................................................................................................. 12
4.2 Via theTFP2 Flash Programming Tool ....................................................................................... 14
4.3 Via the ADM-51 Emulator ........................................................................................................... 17
5 Contact Information .......................................................................................................................... 19
Revision History ........................................................................................................................................ 19
The 78M6618 PDU1 Firmware is a turnkey energy measurement solution optimized for use in
single-phase AC Power Distribution Units (PDUs). At the sensor interface, the 78M6618 with PDU1
Firmware provides eight sense inputs for current and two sense inputs for voltage (single-phase). At the
host interface, either a UART or SPI interface can be used to issue configure the device and access the
following measurement data:
• RMS Voltage
• RMS Current (Line1, Line2,..Line8)
• Active Power (Line1, Li ne2 , ..Li ne8)
• Apparent Power (Line1, Line2,..Line8)
• Reactive Power (Line1, Line2,..Line8)
• Power Factor (Line1, Line2,..Line8)
• Energy (Line1, Line2,..Li ne 8)
• Line Frequency
Fully functional demo code can be evaluated in an Evaluation Kit (EVK) and used as is in some
applications. It can also serve as starting base for customization and adaptation to different system buses
with an optional Software Development Kit (SDK).
The PDU1 Evaluation Kit (EVK) includes the 78M6618 PDU1 Board ( P/N 78M 66 18-PDU-1)
demonstrating measurement and relay control of eight outlets using shunt resistors. The board
incorporates the 78M6618 power and energy measurement IC, sensors, relays, and an isolated serial
port connection to a Windows PC.
ICE Adaptor
Board
USB Cable
CD with GUI
Software and
Documentation
78M6618 PDU1 Board
12VDC Power
Supply
The 78M6618 on the board is pre-programmed with PDU1 Demo Code and calibrated at the factory. The
energy measurement data and status is read back over the serial UART interface presente d to the PC as
a virtual COM port. The 78M6618 PDU1 Evaluation Kit requires a PC with Microsoft
®
Windows XP or later
with a USB port and a minimum 1024 x 768 video display resolution. An AC source and load complete
the rest of the test setup needed to collect measurements.
The SDK contains all the required elements for a variety of usages.
For the user who would like to evaluate the application in their own hardware, pre-built image files are
available. Loading these image files into a 78M6618 will allo w runn ing the app l icati on as prov ide d. A
demonstration PC-based graphical user interface (GUI) is also provided and may be used to send
configuration commands to and read out measurement data from the PDU1 application.
Users who would like to develop their own applications have access to application level source code to
use as a baseline. Energy measurement functions are provided in object code format and with a
documented application programming interface (API). An SDK User Guide describes how to use
development tools to modify the project code. Post processing tools, such as CRC insertion also included
in the SDK package.
The 78M6618 PDU1 SDK includes the following components:
• EMSoC SDK 2.0 Serial Asynchronous Interface Protocol Specification
• EMSoC SDK 2.0 Serial Peripheral Interface (SPI) Protocol Specification
1.3 Other Development Tools
This section describes other items available for purchase through Maxim directly or Maxim’s distributors.
1.3.1 Socketed Flash Programming Board
The 78M6618 Socket Board is a socketed fixture for flash programming 78M6618 devices in small
quantities. It allows for loading program memory into 78M6618 SoCs via either the In-C irc uit Emulator
(ICE) interface, TFP2, or the serial Boot Loader (UART) interface if the device already contains the Boot
Loader in flash. The 78M6618 Socket Board (P/N 78M6618-SOCKET68) includes:
• 78M6618 Socket Board and power supply
• CD with USB Driver, GUI software, and documentation
1.3.2 Compiler and Integrated Development Environment (IDE)
Maxim recommends using the PK51 Professional Developer’s Kit b y Keil™ (www.keil.com), containing
the µVision 4 Integrated Development Environment (IDE), complete with 8051 assembler, editor, C
compiler, linker, and locator. The Demo Code shipped with the Demo Kits for Maxim AC Power
Monitoring ICs was written using this tool. Keil offers the best support for the memory model of the 80515
core used in the 78M6618 ICs. It is possible to use alternative compilers, but the code for these is not
supported by Maxim.
While all Demo Code is written using the standard CA51 tool by Keil, significant improvements in memory
usage can be made by using the PK51 “Professional Developer’s Kit” by Keil. The PK51 contains the
LX51 extended linker that can reduce code size using special optimization techniques.
1.3.3 In-Circuit Emulator (ICE)
The Signum Systems ADM-51 (www.signum.com) is compatible with the Keil symbolic output format and
supports the 78M6618. It is useful to perform the following tasks:
• Code emulation with breakpoints, watch windows, etc., with support of source code symbols
• Memory monitoring and manipulation (SFRs, XRAM, I/O RAM)
• Flash erase and code loading into flash memory of the 78M6618
Maxim supplies the ADM-51 to customers at a preferred price (P/N DB6612-ADM51) along with an
isolated USB cable.
The Signum ADM-51 can serve as a programmer for prototyping and small quantities. For programming
production quantities, Maxim offers the TFP2 Flash Programming Module (P/N 80515-FPBM-TFP2),
which is a stand-alone programmer that can be operated manually or in an ATE environment.
The TFP2 offers the following features:
• Stand-alone or PC-controlled programming
• Variable flash memory size (selectable to match target device’s memory size
• LEDs and signal outputs for PASS and FAIL
• Pushbutton and digital control inputs compatible with ATE
• Can erase and re-program ICs overriding the SECURE bit set
For more information, see the Flash Programmer Model TFP2 User’s Manual.
This section describes the necessary steps to get the pre-built application up and running. Note that some
of the steps are only required once when the setup is installed for the first time.
2.1 USB Driver Installation
The Evaluation Kit includes an isolated USB interface for serial communications with a PC. The FTDI
USB controller IC FT232R performs the USB functions. Refer to the 78M6618 PDU1 Evaluation Board User Manual for information about USB Driver installation.
2.2 Connecting the Evaluation Board to the PC
DO NOT APPLY AC POWER TO THE BOARD YET!
Connect the 78M6618 PDU1 Evaluation Board to a USB port of the PC using the provided USB cable.
The USB controller is powered through this connection. If installed for the first time, the PC will prompt
you to install a USB-COM driver. Refer to the 78M6618 PDU1 Evaluation Board User Manual for more
information.
2.3 Getting Ready to Measure AC Energy
Refer to the included Saf et y Precautions application note and 78M6618 PDU1 Evaluation
Board User Manual for detailed instructions if not already familiar with energy measurement,
and for trouble shooting tips. Otherwise, connect AC source and loads to evaluation board
along with external 12VDC power su ppl y.
2.4 Read Energy Measurement Data
The GUI application is now ready to be used to read energy measurement data and verify that the
hardware and software work properly. Refer to the 78M6618 PDU1 Demo Application User Guide for
more information.
2.5 Calibration
All evaluation kits come pre-calibrated to a precision source.
Note: Calibration requires connection of a reference power supply and a reference load that are more
accurate than the desired calibrated accuracy. For more information, refer to the 78M661x Calibration Procedure.
3.1 Required Hardware and Software Development Tools
3.1.1 Running the PDU1 Application Software
The PDU1 Demo Application can be used without purchasing software development tools. The prebuilt
image file can be downloaded to the 78M6618 device via one of the following methods:
•The UART interface using the 78M6618 Boot Loader (target 78M6618 device must already have Boot
Loader code resident in the flash memory)
• The ICE interface using TFP2 Flash Programmer tool (sold separately)
• The ICE interface using the ADM-51 Emulator (sold separately by Signum Systems Corporation)
3.1.2 Modifying the Application Code
The project application code can be modified and adapted using the Keil development tool suite for the
8051 processor and the ADM-51 Emulator.
• Keil uVision4, version 9.0 and higher (http://www.keil.com/uvision)
The application can be built with or without inclusion of the Boot Loader utility.
3.3.1 Without the Boot Loader
Building the application without the Boot Loader entails that software updates in the end product are
possible only by connecting the TFP2 or ADM-51 tools to the ICE interface port. However, 1 KB of flash
memory is freed when the Boot Loader is not included, which can be used by the application itself.
Select target PDU_NO_BOOT from the drop down list (encircled in the figure above) and press F7 to
build the project. A successful run produces two output files in the \Application\Obj folder. The *.abs file
is most suited to be used by the emulator for debugging. The *.hex file is an image file best suited for
the TFP2 programmer, and contains no debugging information. The *.hex file, as produced by the Keil
compiler, is not suitable for the TFP2 unless the CHKSUM utility is first used to process the file into the
proper format.
3.3.2 With the Boot Loader and CRC
The Boot Loader requires 1 KB of memory and insertion of CRC codes into the image file. Building an
application with the Boot Loader utility allows for subsequent firmware upgrades via the serial interface
(RS-232 or RS-485) connected to the host.
Select target PDU_BOOT from the drop-down list (encircled in the figure above) and press F7 to build the
project. A successful run produces two output files in the \Application\Obj folder. The *.abs file is most
suited to be used by the emulator for debugging. The *.hex file is an image file best suited for the TFP2
programmer, and contains no debugging information. See the Flash Programmer Model TFP2 User’s Manual on how to use the CHKSUM utili t y.
It should be noted that the *.hex output file needs to be post-processed in order to calculate and insert
the CRC values. The Hex2CRCHex.exe application is included, in the tools folder of the SDK, to perform
the post-compiling CRC insertion into the hex file. The resulting hex file is renamed with ‘CRC’ added in
the name. For example: 6618_PDU_CRC.hex is generated by the Hex2CRCHex.exe tool using input file
6618_PDU.hex. The project settings are such that this tool is invoked by default, as shown here:
The ADM-51 Emulator is used to download the *.abs file to the EVM board. Once downloaded, the
developer can run, stop and debug the application. Familiarity with the ADM-51 debugging tools is
assumed for the purpose of this document.
5. To program the device’s flash using the flash image that was just programmed in the TFP2’s
EEPROM in steps 3 and 4 above, type the “P” command at the > prompt or simply push the Program
button on the TFP2. If the programming is successful, a “PASS” message will be displayed. The
Firmware programming is now complete.
For more information about the 78M6618 or other Maxim products, contact technical support at
www.maxim-ic.com/support.
Revision History
Revision
Revision
Description
Pages
0 7/12 First publication. –
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, In c. 160 Rio Robles, San Jose, CA 95134 USA 1-408-601-1000
2012 Maxim Integrated Products is a registered trademark of Maxim Integrated Products.
Rev. 0 19
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.