beautypg.com

6 other functions – NEC PD754144 User Manual

Page 121

background image

CHAPTER 6 PERIPHERAL HARDWARE FUNCTION

121

User’s Manual U10676EJ3V0UM

6.3.6 Other functions

The basic interval timer/watchdog timer has the following functions, regardless of the operations as the basic

interval timer or watchdog timer.

<1> Selects and counts wait time after standby mode has been released

<2> Reads count value

(1) Selecting and counting wait time after STOP mode has been released

Note 1

When the STOP mode has been released, a wait time elapses during which the operation of the CPU is stopped

until the basic interval timer (BT) overflows, so that oscillation of the system clock becomes stabilized.

The wait time that elapses after the RESET signal has been asserted is fixed by a mask option. When the

STOP mode is released by an interrupt, however, the wait time can be selected by BTM. The wait time in

this case is the same as the interval time shown in Figure 6-21. Set BTM before setting the STOP mode (for

details, refer to CHAPTER 8 STANDBY FUNCTION).

Example

To set a wait time of 5.46 ms that elapses when the STOP mode has been released by an interrupt

(at f

X

= 6.0 MHz)

Note 2

SET1

MBE

SEL

MB15

MOV

A, #1101B

MOV

BTM, A

; Sets time

STOP

; Sets STOP mode

NOP

Notes

1. The

µPD754244 only. In the µPD754144, the wait time is fixed to 2

9

/f

CC

(512

µs at 1.0 MHz).

2. It is 7.81 ms when the

µPD754244 is operating at f

X

= 4.19 MHz.

(2) Reading count value

The count value of the basic interval timer (BT) can be read by using an 8-bit manipulation instruction. No

data can be written to the basic interval timer.

Caution

To read the count value of BT, execute the read instruction twice to prevent undefined data

from being read while the count value is updated. Compare the two read values. If the values

are similar, take the latter value as the result. If the two values are completely different, redo

from the beginning.

Example

To read count value of BT

SET1

MBE

SEL

MB15

MOV

HL, #BT

; Sets address of BT to HL

LOOP:

MOV

XA, @HL

; Reads first time

MOV

BC, XA

MOV

XA, @HL

; Reads second time

SKE

XA, BC

BR

LOOP

This manual is related to the following products: