Timer Mode With Gate Functions Selected - Renesas M16C Series User Manual

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

Advertisement

M30240 Group

2.2.2.2 Timer Mode with Gate Functions Selected

In timer mode, select functions from those listed in Table 2.2. An example using the indicated options is
described below. Figure 2.9 shows the operation timing, and Figure 2.10 shows the set-up procedure.
Table 2.2:
Timer A timer mode and gate functions
Item
Count source
O
O
Pulse output function
Gate function
O
Operation
(1) When the count start flag is set to "1" and the TAi
down count on the count source.
(2) When the TAi
IN
(3) 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".
(4) Setting the count start flag to "0" causes the counter to hold its value and to stop.
Note
• Make the pulse width of the signal input to the TAi
FFFF
16
n
0000
16
"1"
Count start flag
"0"
"H"
TAi
pin
IN
input signal
"L"
Timer Ai interrupt
"1"
request bit
"0"
Figure 2.9:
Timer mode timing and gate function operation
Rev.1.00 Sep 24, 2003 Page 149 of 360
Internal count source (f1/f8/f32)
No pulses output
Pulses output
No gate function
Performs count only for the period when the TAi
Performs count only for the period when the TAi
pin inputs at "L" level, the counter holds its value and stops.
n = reload register content
(1) Start count
(2) Stop count
Set to "1" by software
Cleared to "0" when interrupt request is accepted, or cleared by software
Set-up
pin is at "L".
IN
pin is at "H".
IN
pin inputs at "H" level, the counter performs a
IN
pin not less than two cycles of the count source.
IN
(3) Underflow
(4) Stop count
Cleared to "0" by
software
Set to "1" by software
Timer A
Start count again.
Time

Advertisement

Table of Contents
loading

Table of Contents