Other Functions - NEC PD754144 User Manual

4-bit single-chip microcontrollers
Table of Contents

Advertisement

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
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
= 6.0 MHz)
X
SET1
SEL
MOV
MOV
STOP
NOP
1. The µ PD754244 only. In the µ PD754144, the wait time is fixed to 2
Notes
2. It is 7.81 ms when the µ PD754244 is operating at f
(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
LOOP:
CHAPTER 6 PERIPHERAL HARDWARE FUNCTION
Note 2
MBE
MB15
A, #1101B
BTM, A
; Sets time
; Sets STOP mode
SET1
MBE
SEL
MB15
MOV
HL, #BT
MOV
XA, @HL
MOV
BC, XA
MOV
XA, @HL
SKE
XA, BC
BR
LOOP
User's Manual U10676EJ3V0UM
= 4.19 MHz.
X
; Sets address of BT to HL
; Reads first time
; Reads second time
Note 1
9
(512 µ s at 1.0 MHz).
/f
CC
121

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd754244

Table of Contents