Event Counter Mode - Renesas M16C/62P Series Hardware Manual

6-bit single-chip microcomputer
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)
15.1.2

Event Counter Mode

In event counter mode, the timer counts pulses from an external device or overflows and underflows of other
timers. Timer A2, A3 and A4 can count two-phase external signals. Table 15.2 lists Specifications in Event Counter
Mode (when not processing two-phase pulse signal). Table 15.3 lists Specifications in Event Counter Mode (when
processing two-phase pulse signal with Timer A2, A3 and A4). Figure 15.9 shows TAiMR Register in Event
Counter Mode (when not using two-phase pulse signal processing). Figure 15.10 shows TA2MR to TA4MR
Registers in Event Counter Mode (when using two-phase pulse signal processing with Timer A2, A3 and A4).
Table 15.2
Specifications in Event Counter Mode (when not processing two-phase pulse signal)
Item
Count Source
Count Operation
Divided Ratio
Count Start Condition
Count Stop Condition
Interrupt Request
Generation Timing
TAiIN Pin Function
TAiOUT Pin Function
Read from Timer
Write to Timer
Select Function
Rev.2.41
Jan 10, 2006
REJ09B0185-0241
http://www.xinpian.net
• External signals input to TAiIN pin (i=0 to 4) (effective edge can be selected in
program)
• Timer B2 overflows or underflows,
Timer Aj (j=i-1, except j=4 if i=0) overflows or underflows,
Timer Ak (k=i+1, except k=0 if i=4) overflows or underflows
• Up-count or down-count can be selected by external signal or program
• When the timer overflows or underflows, it reloads the reload register contents
and continues counting. When operating in free-running mode, the timer
continues counting without reloading.
1/ (FFFFh - n + 1) for up-count
1/ (n + 1) for down-count n : set value of TAi register 0000h to FFFFh
Set TAiS bit in the TABSR register to "1" (= start counting)
Set TAiS bit to "0" (= stop counting)
Timer overflow or underflow
I/O port or count source input
I/O port, pulse output, or up/down-count select input
Count value can be read by reading TAi register
• When not counting and until the 1st count source is input after counting start
Value written to TAi register is written to both reload register and counter
• When counting (after 1st count source input)
Value written to TAi register is written to only reload register
(Transferred to counter when reloaded next)
• Free-run count function
Even when the timer overflows or underflows, the reload register content is
not reloaded to it
• Pulse output function
Whenever the timer underflows or underflows, the output polarity of TAiOUT
pin is inverted. When TAiS bit is set to "0" (stop counting), the pin outputs a
low.
Page 146 of 390
提供单片机解密、IC解密、芯片解密业务
Specification
010-62245566 13810019655
15. Timers

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pM16c/62pt

Table of Contents