NEC PD17062 User Manual
Page 161

161
µ
PD17062
13.4.4 Releasing the Halt State by the Timer Carry FF
The HALT 0010B instruction specifies the timer carry FF as a halt release condition.
If it is specified that the halt state is to be released according to the timer carry FF, the halt state is released
immediately when the timer carry FF is set to 1.
The timer carry FF corresponds to the BTM0CY flag (bit b
0
at address 17H) in the control register on a one-
to-one basis, and is set to 1 at constant intervals (5 or 100 ms).
Use of the timer carry FF can therefore release the halt state at constant intervals.
An example of using the HALT 0010B instruction follows:
Example
HLTTMR
DAT 0010B
; Defines a symbol.
INITFLG
NOT BTM0ZX, NOT BTM0CK2, NOT BTM0CK1, NOT BTM0CK0
; Built-in macro
; Specifies the timer carry FF setting time interval as 100 ms.
LOOP1:
MOV
M1, #0110B
LOOP2:
HALT
HLTTMR
; Specifies the timer carry FF as a halt release condition.
SKT1
BTM0CY
; Built-in macro
BR
LOOP
; Branches to LOOP2 if the BTM0CY flag is not set.
ADD
M1, #0001B
; Adds 0001B to the contents of M1.
SKT1
CY
; Built-in macro
BR
LOOP2
; Performs process A if there is a carry.
Process A
BR
LOOP1
This sample program releases the halt state at intervals of 100 ms and perform process A at intervals of
1 s.