R01UH0092EJ0110 Rev.1.10
Page 282 of 807
Jul 31, 2012
M16C/64C Group
17. Timer A
17.3.4.3
Counter Initialization Using Two-Phase Pulse Signal Processing
This function initializes the timer count value to 0000h using Z-phase (counter initialization) input
during two-phase pulse signal processing.
This function can only be used in timer A3 event counter mode during two-phase pulse signal
processing, free-running type, multiply-by-4 processing, with Z-phase entered from the ZP pin.
Counter initialization by Z-phase input is enabled by writing 0000h to the TA3 register and setting the
TAZIE bit in the ONSF register to 1 (Z-phase input enabled).
Counter initialization is accomplished by Z-phase input edge detection. The rising or falling edge can
be selected as the active edge by setting the POL bit in the INT2IC register. The Z-phase pulse width
must be equal to or greater than one clock cycle of the timer A3 count source.
The counter is initialized at the next count timing after accepting Z-phase input. Figure 17.9 shows
the Relationship between the Two-Phase Pulse (A-Phase and B-Phase) and the Z-Phase.
When timer A3 overflow or underflow coincides with counter initialization by Z-phase input, a timer A3
interrupt request is generated twice in succession. Do not use the timer A3 interrupt when using this
function.
Figure 17.9
Relationship between the Two-Phase Pulse (A-Phase and B-Phase) and the Z-Phase
TA3OUT input
(A-phase)
TA3IN input
(B-phase)
Count source
Input pulse for one clock cycle of the count
source or greater.
ZP input
(1)
(Z-phase)
Note:
1. This timing diagram assumes when the POL bit in the INT2IC register is 1 (rising edge).
Timer A3
m
m + 1
1
2
3
4
5
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...