beautypg.com

Figure 5-4) – Maxim Integrated 71M6513H Power Meter IC Family Software User Manual

Page 46

background image

71M651x Software User’s Guide

ce_update()

display_CE()

IDLE

END

call_when_waiting()

process_timers()

Events_Reset_Watchdog()

call_when_waiting()

END

Figure 5-4: MAIN LOOP

API_Init()

cli_Init()

*INIT

init_meter()

Serial_Rx()

ce_Init()

memcpy_cex_1()

cal_restore() = TRUE

Ext_Int_Config()

LCD_Init()

LCD_Hellp()

send_copyright()

xfer_busy_beat = TRUE

XFER_BUSY_BEAT=

defined?

xfer_busy_beat = FALSE

ce_enable(TRUE)

WD_RST = TRUE

wait(10)

WPULSE_Enable(TRUE)

VARPULSE_Enable(TRUE)

END

EXT_Int_Config()

Figure 5-5: INIT Function

Before the MPU gets to execute the main() program, it will execute the startup instructions contained in the
STARTUP.A51 assembly program (Figure 5-1). Upon completion, STARTUP.A51 causes a jump to the label

Revision 2.4

TERIDIAN Proprietary

46 of 137

© Copyright 2005-2006 TERIDIAN Semiconductor Corporation