NEC PD17062 Datasheet page 139

Mos integrated circuit 4-bit single-chip microcontroller containing pll frequency synthesizer and image display controller
Table of Contents

Advertisement

(2) Timer error that occurs when the timer carry FF setting time interval is changed
The timer carry FF setting time interval is specified by the BTM0CK2, BTM0CK1, and BTM0CK0 flags in the
timer mode select register.
As shown in Fig. 12-1 and 12-2, the timer interval set pulse can be selected from 200 Hz, 10 Hz, and an external
timer.
These three pulses operate independently.
Therefore, when the timer interval set pulse is switched using the BTM0CK2, BTM0CK1, or BTM0CK0 flag,
a timer error occurs as shown in the following example.
Example
#
;
INITFLG NOT BTM0ZX, NOT BTM0CK2, NOT BTM0CK1, NOT BTM0CK0
; Built-n macro
Process A
; Specifies the timer carry FF set pulse as 10 Hz (100 ms).
$
;
SET1 BTM0CK0 ; Built-in macro
; Specifies the timer carry FF set pulse as 200 Hz (5 ms).
Process A
%
;
CLR1 BTM0CK0 ; Built-in macro
; Specifies the timer carry FF set pulse as 10 Hz (100 ms).
With this coding, the timer carry FF set pulse is switched as shown below.
Internal pulse 10 Hz
Internal pulse 200 Hz
Timer carry FF set pulse
#
BTM0CY flag
As shown above, when the timer carry FF setting time interval is switched, if a newly selected pulse goes
low, it allows the BTM0CY flag to preserve its previous state (
%
the BTM0CY flag to 1 (
$
SKT1 BTM0CY
in the figure).
SET1 BTM0CK0
$
in the figure). If the pulse goes high, it sets
PD17062
%
CLR1 BTM0CK0
139

Advertisement

Table of Contents
loading

Table of Contents