Timer Mode With Pulse-Output Function 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.3 Timer Mode with Pulse-output Function Selected

In timer mode, select functions from those listed in Table 2.3 . An example using the indicated options
is described below. Figure 2.11 shows the operation timing, and Figure 2.12 shows the set-up proce-
dure.
Table 2.3:
Timer A timer timing mode and pulse-output functions
Item
Count source
O
Pulse output function
O
O
Gate function
Operation
(1) Setting the count start flag to "1" causes the counter to perform a down count on 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". Also, the output polarity of the TAiOUT pin re-
verses.
(3) Setting the count start flag to "0" causes the counter to hold its value and to stop. Also, the TAiOUT
pin outputs an "L" level.
FFFF
16
n
0000
16
"1"
Count start flag
"0"
Pulse output from
"H"
TAi
pin
OUT
"L"
Timer Ai interrupt
"1"
request bit
"0"
Figure 2.11: Timer mode timing and pulse output function operation
Rev.1.00 Sep 24, 2003 Page 151 of 360
Internal count source (f1/f8/f32)
No pulses output
Pulses output
No gate function
Performs count only for the period when the TAiIN pin is at "L".
Performs count only for the period when the TAiIN pin is at "H".
n = reload register content
(2) Underflow
(1) Start count
Cleared to "0" by
Set to "1" by software
software
Cleared to "0" when interrupt request is accepted, or cleared by software
Set-up
(3) Stop count
Start count again
Set to "1" by software
Timer A
Time

Advertisement

Table of Contents
loading

Table of Contents