Watchdog timer enable flag [wdtm, Operation of the basic interval timer – NEC PD750008 User Manual

Page 121

Advertising
background image

101

CHAPTER 5 PERIPHERAL HARDWARE FUNCTIONS

5.3.3 Watchdog Timer Enable Flag (WDTM)

WDTM, when set, is a flag for enabling the generation of the reset signal when the basic interval timer

overflows. WDTM is set by a bit manipulation instruction. It cannot be cleared by an instruction.

Example Set the watchdog timer function.

SEL

MB15

; or CLR1 MBE

SET1

WDTM

·

·

·

SET1

BTM.3

; Set bit 3 of BTM to 1

The generation of a RESET signal clears WDTM to 0.

Figure 5-25. Format of the Watchdog Timer Enable Flag (WDTM)

5.3.4 Operation of the Basic Interval Timer

When WDTM is set to 0, the basic interval timer (BT) functions as an interval timer. An interrupt request

flag (IRQBT) is set when the timer overflows. BT is constantly incremented by the clock supplied from the

clock generator. So it is impossible to stop the timer from incrementing.

One of four interrupt generation intervals can be selected by setting BTM. (See Figure 5-24.)

BT and IRQBT can be cleared by setting bit 3 of BTM to 1 (instruction for starting as an interval timer).

The count status of BT can be read by an 8-bit manipulation instruction. No data can be loaded to the timer.

Perform the timer operation as follows (<1> and <2> can be performed with the same instruction):

<1> Set the interval in BTM.

<2> Set 1 in bit 3 of BTM.

Example Generate an interrupt at intervals of 1.37 ms (at 6.00 MHz).

SET1

MBE

SEL

MB15

MOV

A,#1111B

MOV

BTM,A

; Set the interval and start processing

EI

; Enable interrupt

EI

IEBT

; Enable BT interrupt

WDTM

0

1

BT mode
Sets IRQBT when the basic interval timer (BT)
overflows.

WT mode
Generates an internal reset signal when the basic
interval timer (BT) overflows.

F8BH.3

Address

Advertising
This manual is related to the following products: