Download Print this page

Renesas M16C/50 Series User Manual page 293

Advertisement

M16C/5L Group, M16C/56 Group
15.3.4
Event Counter Mode (When Processing Two-Phase Pulse Signal)
Timers A2, A3, and A4 can be used to count two-phase pulse signals. Table 15.10 lists Event Counter
Mode Specifications (When Processing Two-Phase Pulse Signal with Timers A2, A3, and A4). Table
15.11 lists Registers and the Setting in Event Counter Mode (When Processing Two-Phase Pulse
Signal).
Table 15.10
Event Counter Mode Specifications (When Processing Two-Phase Pulse Signal with
Timers A2, A3, and A4)
Item
Count source
Count operations
Number of counts
Count start condition
Count stop condition
Interrupt request
generation timing
TAiIN pin function
TAiOUT pin function
Read from timer
Write to timer
Selectable functions
i = 2 to 4
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
Two-phase pulse signals input to the TAiIN or TAiOUT pin
Increment or decrement can be selected by a two-phase pulse signal.
When the timer overflows or underflows, it reloads the reload register value and
continues counting. When selecting free-run type, the timer continues counting
without reloading.
When selecting reload type:
FFFFh - n + 1 when incrementing
n + 1 when decrementing
n: setting value of the TAi register, 0000h to FFFFh
Set the TAiS bit in the TABSR register to 1 (start counting).
Set the TAiS bit to 0 (stop counting).
Timer overflow or underflow
Two-phase pulse input
Two-phase pulse input
Count value can be read by reading timer A2, A3, or A4 register.
When not counting
Value written to the TAi register is written to both the reload register and counter.
When counting
Value written to the TAi register is written to only reload register
(transferred to counter when reloaded next).
Select normal or multiply-by-4 processing operation (timer A3).
Counter initialization by Z-phase input (timer A3)
The timer count value is initialized to 0 by Z-phase input.
Specification
15. Timer A
Page 256 of 803

Advertisement

loading