EasyManuals Logo
Home>Renesas>Computer Hardware>M16C Series

Renesas M16C Series User Manual

Renesas M16C Series
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #171 background imageLoading...
Page #171 background image
Timer A
M30240 Group
Rev.1.00 Sep 24, 2003 Page 153 of 360
2.2.2.4 Event Counter Mode with Reload Type Selected
In event counter mode, select functions from those listed in Table 2.4 . An example using the indicated
options is described below. Figure 2.13 shows the operation timing, and Figure 2.14 shows the set-up
procedure.
Table 2.4: Timer A event counter mode and reload type functions
Note j = i - 1, but j = 4 when i = 0
Operation
(1) Setting the count start flag to “1” causes the counter to count the falling edges of the count source.
(2) If an underflow occurs, the content of the reload register is reloaded, and 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) Setting the count start flag to “0” causes the counter to hold its value and to stop.
(5) If an overflow occurs, the content of the reload register is reloaded, and the count continues. At
this time, the Timer Ai interrupt request bit goes to “1”.
Figure 2.13: Event counter mode timing and reload type operations
Item
Set-up Item Set-up
Count source
O
Input signal to TAi
IN
(counting
falling edges)
Pulse output function
O No pulses output
Pulses output
Input signal to TAi
IN
(counting
rising edges)
Count operation type
O Reload type
Free-run type
Timer overflow (TB2/TAj
overflow)
Factor for switching
between up and down
O Up/Down flag contents
Input signal to TAi
OUT
FFFF16
n
0000
16
Time
Counter content (hex)
n = reload register content
(1) Start count
Count start flag
“1”
Set to “1” by software
“0”
Timer Ai interrupt
request bit
“1”
“0”
Up/down flag
“1”
“0”
Set to “1” by software
Set to “1” by software
(5) Overflow
Cleared to “0” when interrupt request is accepted, or cleared by software
Start count again
(2) Underflow
(3) Switch count
Cleared to “0” by
software
(4) Stop count

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas M16C Series and is the answer not in the manual?

Renesas M16C Series Specifications

General IconGeneral
BrandRenesas
ModelM16C Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals