208
CHAPTER 10 WATCHDOG TIMER
10.6 Sample Programs of Watchdog Timer
Sample programs for the watchdog timer are shown below.
■
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 EQU 0000A8H ; Watchdog timer control register
WTE EQU WDTC:2 ; Watchdog control bit
;---------- Main program ------------------------------------------------------
CODE CSEG
START:
; : ; Assumption that the stack pointer (SP),
; etc., have been initialized.
WDG_START:
MOV WDTC, #00000011B ; Start of watchdog timer Selection of
;interval time of 2
21
±
2
18
cycles
;---------- Main loop ---------------------------------------------------------
MAIN: CLRB I:WTE ; Clearing of watchdog timer
; : ; Periodic 2-bit clearing
; User processing
; :
JMP MAIN ; Loop time shorter than interval
; time of watchdog timer
CODE ENDS
;---------- Specifying vectors ------------------------------------------------
VECT CSEG ABS=0FFH
ORG 0FFDCH ; Specifying the reset vector
DSL START
DB 00H ; Setting to the single-chip mode
VECT ENDS
END START
Summary of Contents for MB90480 Series
Page 2: ......
Page 4: ......
Page 10: ...vi ...
Page 128: ...106 CHAPTER 4 RESET ...
Page 174: ...152 CHAPTER 6 LOW POWER CONSUMPTION MODE ...
Page 198: ...176 CHAPTER 7 MODE SETTING ...
Page 220: ...198 CHAPTER 9 TIMEBASE TIMER ...
Page 238: ...216 CHAPTER 11 WATCH TIMER ...
Page 280: ...258 CHAPTER 12 16 BIT INPUT OUTPUT TIMER ...
Page 406: ...384 CHAPTER 17 8 10 BIT A D CONVERTER ...
Page 478: ...456 CHAPTER 20 CHIP SELECTION FACILITY ...
Page 494: ...472 CHAPTER 21 ADDRESS MATCH DETECTION FUNCTION ...
Page 498: ...476 CHAPTER 22 ROM MIRROR FUNCTION SELECTION MODULE ...
Page 526: ...504 CHAPTER 23 2M 3M BIT FLASH MEMORY ...
Page 536: ...514 CHAPTER 24 EXAMPLES OF MB90F481B MB90F482B MB90F488B MB90F489B SERIAL PROGRAMMING ...
Page 570: ...548 CHAPTER 25 PWC TIMER ONLY MB90485 SERIES ...
Page 688: ......