English
Language : 

PD17012_15 Datasheet, PDF (122/320 Pages) Renesas Technology Corp – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DIGITAL TUNING SYSTEM HARDWARE
µPD17012, 17P012
(2) Error when time interval to set BTM0CY flag is changed
The BTM0CK1 and BTM0CK0 flags set the time of the BTM0CY flag.
As described in 12.2.2, four types of timer time-setting pulses can be selected: 1 kHz, 200 Hz, 10 Hz,
and 4 Hz.
At this time, these four pulses operate independently. If the timer time-setting pulse is changed by using
the BTM0CK1 and BTM0CK0 flags, an error occurs as described in the example below.
Example
; <1>
INTIFLG BTM0CK1, NOT BTM0CK0
; Sets BTM0CY flag setting pulse to 200 Hz (5 ms)
Processing A
; <2>
INITFLG BTM0CK1, BTM0CK0
; Sets BTM0CY flag setting pulse to 1 kHz (1 ms)
Processing A
; <3>
INITFLG BTM0CK1, NOT BTM0CK0
; Sets BTM0CY flag setting pulse to 200 Hz (5 ms)
At this time, the BTM0CY flag setting pulse is changed as shown in Figure 12-6.
Figure 12-6. Changing BTM0CY Flag Setting Pulse
Internal pulse H
200 Hz L
Internal pulse H
1 kHz L
BTM0CY flag H
setting pulse L
<1>
<2>
<3>
1
BTM0CY flag
0
SKT1 BTM0CY
As shown in Figure 12-6, if the BTM0CY flag setting time is changed and the new pulse falls, the BTM0CY
flag retains the previous status (<2> in the figure). If the new pulse rises, however, the BTM0CY flag
is set to 1 (<3> in the figure).
Although changing the pulse setting between 200 Hz (5 ms) and 1 kHz (1 ms) is described in this example,
the same applies to changing the pulse in respect to 4 Hz (250 ms) and 10 Hz (100 ms).
120
Data Sheet U10101EJ4V0DS