beautypg.com

Ce/mpu interface, Source files, Ce/mpu interface 5.6. source files – Maxim Integrated 71M6513H Power Meter IC Family Software User Manual

Page 68

background image

71M651x Software User’s Guide

5.5.CE/MPU INTERFACE

The interface between the CE and the MPU is described completely in the 71M6511 and 71M6513 Data Sheets.

5.6.SOURCE FILES

The functionality of the Demo Code is implemented in the following files and directories:

1.

CLI:

Command Line Interface – General Commands

access.c

SFR, I/O RAM, MPU and CE data access

cli.c

parser for command line interface

cmd_ce.c

sub-parser for CE commands

cmd_misc.c

sub-parser for RTC, EEPROM, trim and PS commands

io.c

number conversion functions and auxiliary routines for CLI

load.c

upload and download

sfrs.c

access to SFRs

When compiled, CLI.C takes about 20Kbytes of program space. When designing a real meter, CLI.C can
easily be removed without major changes to the software.

2.

CLI_6513

Command Line Interface, 6513-Specific

help.c

display of help text

profile.c

data collection for support of profile command

3.

CLI_6511

Command Line Interface, 6511-Specific

help.c

display of help text

profile.c

data collection for support of profile command

4.

IO:

Input/Output

eeprom.c

interrupt-driven serial EEPROM routines

eepromp.c

high-speed polling EEPROM routines

iicdio.c

I2C bus interface using direct control of DIO4 and DIO5

iiceep.c

I2C bus interface using the chip’s I2C hardware

lcd.c

initialization, configuration, read and write routines for LCDs

lcd_VIM808.c

routines for driving Varitronix VIM-808 LCS

rtc.c

RTC read, write, reset, and trim routines

serial.c

initialization, configuration, flow-control, interrupt service routines for serial ports

5.

Main_6513:

Main top-level tasks, 6513-specific

defaults.c

meter initialization with default values

demo.c

main() with startup sequence and main task switch

display.c

top-level display routines

6.

Main_6511:

Main top-level tasks, 6511-specific

defaults.c

meter initialization with default values

demo.c

main() with startup sequence and main task switch

display.c

top-level display routines

7.

Meter:

Metering Functions

cal.c

auto-calibration

ce.c

compute metering values from data provided by CE

ce651X.c

data exchange between CE data RAM and XRAM

io651X.c

control of analog front end, multiplexer, RTM, I/O pins

misc.c

interrupts, reset, port configuration, MPU power management

8.

Util:

Utilities

classics.c

math routines (add, subtract, multiply, divide, square

events.c

event management

flash.c

flash memory read, write, erase, compare and checksum calculation

library.c

memory copy, compare, CRC calculation, string length, square root and shift

onek_c.asm

assembly test program exercising I/O pins and testing RAM, ROM, CE DRAM, CE PRAM

timers.c

timer configuration, delay

Revision 2.4

TERIDIAN Proprietary

68 of 137

© Copyright 2005-2006 TERIDIAN Semiconductor Corporation