Rev.2.00 Oct 16, 2006 page 20 of 354
REJ09B0340-0200
M30245 Group
2. Timer A
Figure 2.2.14. Operation timing of event counter mode, free run type selected
2.2.6 Operation of Timer A (event counter mode, free run type selected)
In event counter mode, choose functions from those listed in Table 2.2.5. Operations of the circled items
are described below. Figure 2.2.14 shows the operation timing, and Figure 2.2.15 shows the set-up
procedure.
Note: j = i – 1, but j = 4 when i = 0
(1) Setting the count start flag to “1” causes the counter to count the falling edges of the count
source.
(2) Even if an underflow occurs, the content of the reload register is not reloaded, but the count
continues. At this time, the timer Ai interrupt request bit goes to “1”.
(3) If switching from an up count to a down count or vice versa while a count is in progress, the
switch takes effect from the next effective edge of the count source.
(4) Even if an overflow occurs, the content of the reload register is not reloaded, but the count
continues. At this time, the timer Ai interrupt request bit goes to “1”.
Item
Item
Set-up
Set-up
Count source
Input signal to TAi
IN
(counting falling edges)
Input signal to TAi
IN
(counting rising edges)
TAj overflow
Count operation type
Reload type
Free-run type
Factor for switching
between up and
down
Content of up/down flag
Input signal to TAi
OUT
Pulse output function
No pulses output
Pulses output
O
O
O
O
Table 2.2.5. Choosed functions
Operation
FFFF
16
n
0000
16
Time
Counter content (hex)
n = reload register content
(1) Start count
Count start flag
“1”
“0”
Timer Ai interrupt
request bit
“1”
Cleared to “0” when interrupt request is accepted, or cleared by software
“0”
Up/down flag
“1”
“0”
Set to “1” by software
(2) Underflow
(3) Switch count
(4)
Overflow
Set to “1” by software
Note: First set to “Reload type” operation. Once the first counting pulse has occurred, the timer may be changed to “Free-Run type”.
(Note)
Summary of Contents for M16C FAMILY
Page 12: ...Chapter 1 Hardware...
Page 13: ...See M30245 group datasheet...
Page 14: ...Chapter 2 Peripheral Functions Usage...
Page 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Page 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Page 340: ...Chapter 4 External Buses...
Page 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Page 362: ...Chapter 5 Standard Characteristics...