Renesas M16C Series User Manual page 172

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

Advertisement

M30240 Group
Selecting event counter mode and functions
b7
0
0
0
Setting up/down flag
b7
0
0
0
Setting one-shot start flag and trigger select register
b7
Note: Set the corresponding port direction register to "0".
Setting divide ratio
(b15)
b7
Setting count start flag
b7
Figure 2.14: Set-up procedure for event counter mode and reload type functions
Rev.1.00 Sep 24, 2003 Page 154 of 360
b0
Timer Ai mode register (i=0 to 4) [Address 0396
0
0
0
1
TAiMR (i=0 to 4)
Selection of event counter mode
Pulse output function select bit
0 : Pulse is not output (TA
pin is a normal port pin)
iOUT
Count polarity select bit
0 : Counts external signal's falling edge
Up/down switching cause select bit
0 : Up/down flag's content
0 (Must always be "0" in event counter mode)
Count operation type select bit
0 : Reload type
Invalid in event counter mode (i = 0, 1)
Invalid when not using two-phase pulse signal processing(i = 2 to 4)
b0
Up/down flag [Address 0384
16
UDF
Timer A0 up/down flag
0 : Down count
Timer A1 up/down flag
0 : Down count
Timer A2 up/down flag
0 : Down count
Timer A3 up/down flag
0 : Down count
Timer A4 up/down flag
0 : Down count
When not using the 2-phase pulse signal processing function, set the select bit to "0".
b0
One-shot start flag [Address 0382
ONSF
Timer A0 event/trigger select bit
b7 b6
0 0 :
Input on TA0
is selected (Note)
IN
Timer A0 register [Address 0387
(b8)
Timer A1 register [Address 0389
b0
b7
b0
Timer A2 register [Address 038B
Timer A3 register [Address 038D
Timer A4 register [Address 038F
Can be set to 0000
to FFFF
16
b0
Count start flag [Address 0380
16
TABSR
Timer A0 count start flag
Timer A1 count start flag
Timer A2 count start flag
Timer A3 count start flag
Timer A4 count start flag
to 039A
]
16
16
]
b7
b0
Trigger select register [Address 0383
]
16
TRGSR
Timer A1 event/trigger select bit
b1 b0
0 0 :
Input on TA1
Timer A2 event/trigger select bit
b3 b2
0 0 :
Input on TA2
Timer A3 event/trigger select bit
b5 b4
0 0 :
Input on TA3
Timer A4 event/trigger select bit
b7 b6
0 0 :
Input on TA4
, 0386
] TA0
16
16
, 0388
] TA1
16
16
, 038A
] TA2
16
16
, 038C
] TA3
16
16
, 038E
] TA4
16
16
16
]
Start count
Timer A
]
16
is selected (Note)
IN
is selected (Note)
IN
is selected (Note)
IN
is selected (Note)
IN

Advertisement

Table of Contents
loading

Table of Contents