3874 Group User’s Manual
3-21
APPENDIX
3.3 Notes on use
3.3.3 Notes on timer Y
(1)
Common to all modes
q When reading or writing to timer Y, be sure to execute to both timer Y (high-order) and timer Y
(low-order).
q When reading a value from timer Y, read it in order of timer Y (high-order) and timer Y (low-order)
following. When writing a value to timer Y, write in order of timer Y (low-order) and timer Y (high-
order) following.
q If the following operations are performed to timer Y, expected operation may occur.
Write operation before execution of timer Y (low-order) reading
Read operation before execution of timer Y (high-order) writing
s Division ratio of timer Y
When a value n (0 to FFFF16) is written to timer Y, the division ratio is 1/(n+1).
s Select of CNTR1 interrupt active edge
Setting the CNTR1 active edge switch bit affects the active edge of an interrupt. Consequently, a
CNTR1 interrupt request may occur by setting the CNTR1 active edge switch bit. As a countermeasure
against the above, switch the active edge after disabling the CNTR1 interrupt, and set “0” to the
CNTR1 interrupt request bit following.
(2)
Period measurement mode
q Set bit 5 (corresponding to the CNTR1 pin) of the port P5 direction register to “0” (input mode).
(3)
Event counter mode
q Set bit 5 (corresponding to the CNTR1 pin) of the port P5 direction register to “0” (input mode).
(4)
Pulse width HL continuously measurement mode
q Set bit 5 (corresponding to the CNTR1 pin) of the port P5 direction register to be the input mode.
q The CNTR1 interrupt request occurs at both edges of a input pulse regardless of the contents of
the CNTR1 active edge switch bit of the timer Y mode register.
3.3.4 Notes on timers 1, 2, 3
(1)
Notes on timer 1 to timer 3
q When a value n (“0” to “255”) is written to the timer latch, the division ratio is 1/(n+1).
q In case of the following, a short pulse occurs on counted input signals, so that the timer count
value may change greatly. Accordingly, after setting their count sources, set values in order of
timer 1, timer 2, and timer 3:
When the count sources of timers 1 to 3 are switched
When the timer 1 output signal is selected as a count source of timer 2 or timer 3 and data is
written to timer 1
(2) Notes on timer 2
q When writing to the latch only is selected, the value written into timer 2 is written only in the latch
for reloading and the contents of timer 2 is not changed. This written value is transferred to timer
2 at the first underflow after writing. Normally, a value is written in both the latch and timer at one
time. That is, when a value is written to the timer, it is set in both the latch and the timer.
q In the TOUT output enabled state, a signal whose polarity is reversed each time timer 2 underflows
is output from the TOUT pin. In this case, set port P50 (sharing with the TOUT pin) to the output mode.