Operation Of Timer A (Event Counter Mode, Free Run Type Selected) - Renesas M16C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30245 Group

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.
www.DataSheet4U.com
Operation
Count start flag
Up/down flag
Timer Ai interrupt
request bit
Note: First set to "Reload type" operation. Once the first counting pulse has occurred, the timer may be changed to "Free-Run type".
Figure 2.2.14. Operation timing of event counter mode, free run type selected
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
Table 2.2.5. Choosed functions
Item
Count source
Input signal to TAi
O
(counting falling edges)
Input signal to TAi
(counting rising edges)
TAj overflow
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".
n = reload register content
(2) Underflow
FFFF
16
(1) Start count
n
(Note)
0000
16
Set to "1" by software
"1"
"0"
"1"
"0"
"1"
"0"
page 20 of 354
Set-up
Pulse output function
IN
Count operation type
IN
Factor for switching
between up and
down
(3) Switch count
Cleared to "0" when interrupt request is accepted, or cleared by software
Item
Set-up
O
No pulses output
Pulses output
Reload type
O
Free-run type
O
Content of up/down flag
Input signal to TAi
(4)
Overflow
Set to "1" by software
2. Timer A
OUT
Time

Advertisement

Table of Contents
loading

Table of Contents