7 ce/mpu interface, 8 boot loader, 9 source files – Maxim Integrated 71M6534 Energy Meter IC Family Software User Manual
Page 64: Ce/mpu interface, Boot loader, Source files

71M653X Software User’s Guide
The MPU also places a scaled value into the CE RAM for each pulse output (meter\meter.c, meter_run(),
meter\pulse_src.c, selectpulses() ). This adjusts the pulse output frequency in such a way as to reflect that
accumulation's contribution to the total pulse interval. Pulse intervals are cumulative, and cumulatively accurate, even
though the frequency is updated only periodically.
Placing the pulse value selection logic into the MPU software means that any quantity from any phase or combination
of phases can control either pulse output (see PulseSrcFunc[] for a list of transfer functions).
The MPU also performs temperature adjustments of the real-time clock (rtc_30.c, RTC_Trim(), RTC_Adjust_Trim() ).
The Demo Code can adjust the clock speed to a resolution of 1 part per billion, roughly one second per thirty years.
The adjustments include offset (Y_CAL), temperature-linear (Y_CALC) and temperature-squared (Y_CALC2)
parameters.
Once a human-readable quantity is available, it can be translated into a set of segments (meter.c, lcd.c) to display on
the liquid crystal display, or read from a register in memory by means of the command-line interface (cli.c), or possibly
some other serial protocol such as Flag (see flag.c) or NEMA.
5.7 CE/MPU INTERFACE
The interface between the CE and the MPU is described completely in the 71M653x Data Sheet.
5.8 BOOT LOADER
It is possible to implement code that functions as a boot loader. This feature is useful for field updates and various test
scenarios.
See the TERIDIAN Application Note number 031 for details.
5.9 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 memory access routines
access_x.c
extended memory access routines
c_serial.c
parser for command line interface
cli.c
command line interface routines
cmd_ce.c
sub-parser for CE commands
cmd_misc.c
sub-parser for RTC, EEPROM, trim and PS commands
help.c
display of help text
io.c
number conversion functions and auxiliary routines for CLI
load.c
upload and download
profile.c
data collection for support of profile command
ser0cli.c
ser1cli.c
sercli.c
buffer serial I/O for the CLI
These files take about 19Kbytes of program space. In production meters, this code
can easily be removed without major changes to the software.
2. IO: Input/Output
cal_ldr.c
load routines for calibration factors
eep24C08.c
routines supporting the 24C08 EEPROM
eeprom.c
interrupt-driven serial EEPROM routines
eepromp.c
high-speed polling EEPROM routines
eepromp3.c
polling interface for µWire EEPROM
iiceep.c
I2C bus interface using the chip’s I2C hardware
iolite.c
IO subroutines for use by the calibration loader (cal_ldr.c)
lcd.c initialization,
configuration, read and write routines for LCDs
rtc_30.c
RTC read, write, reset, and trim routines
ser.c
baud rate table shared by ser0.c and ser1.c
ser0.c initialization,
configuration, interrupt, read and write routines for SER0
ser1.c initialization,
configuration, interrupt, read and write routines for SER1
v1.1v1.1
TERIDIAN Proprietary
64 of 116
© Copyright 2005-2008 TERIDIAN Semiconductor Corporation