Sample Programs - Fujitsu F2MC-16LX Hardware Manual

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

10.6 Sample Programs

Sample programs for the watchdog timer are shown below.
I Sample programs for watchdog timer
❍ Specifications for processing
Clears the watchdog timer once per loop of the main program.
The main loop must complete a circuit within the minimum interval time of the watchdog
timer.
❍ Sample coding
WDTC
WTE
;---------- Main program ------------------------------------------------------
CODE
START:
;
WDG_START:
;---------- Main loop ---------------------------------------------------------
MAIN:
;
;
;
CODE
;---------- Specifying vectors ------------------------------------------------
VECT
VECT
EQU
0000A8H
EQU
WDTC:2
CSEG
:
MOV
WDTC, #00000011B
CLRB
I:WTE
:
User processing
:
JMP
MAIN
ENDS
CSEG
ABS=0FFH
ORG
0FFDCH
DSL
START
DB
00H
ENDS
END
START
CHAPTER 10 WATCHDOG TIMER
; Watchdog timer control register
; Watchdog control bit
; Assumption that the stack pointer (SP),
; etc., have been initialized.
; Start of watchdog timer Selection of
± 2
21
;interval time of 2
; Clearing of watchdog timer
; Periodic 2-bit clearing
; Loop time shorter than interval
; time of watchdog timer
; Specifying the reset vector
; Setting to the single-chip mode
18
cycles
213

Advertisement

Table of Contents
loading

Table of Contents