Renesas M16C Series User Manual page 28

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

Advertisement

M30245 Group
Selecting event counter mode and functions
b7
www.DataSheet4U.com
Setting up/down flag
b7
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.2.13. Set-up procedure of event counter mode, reload type selected
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
b0
Timer Ai mode register (i=0 to 4) [Address 0396
0
0
0
0
0
0
1
TAiMR (i=0 to 4)
Selection of event counter mode
Pulse output function select bit
0 : Pulse is not output (TAi OUT pin is a normal port pin)
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
0
0
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
0
ONSF
Timer A0 event/trigger select bit
b7 b6
0 0 :
Input on TA0
(b8)
b0
b7
Can be set to 0000
b0
Count start flag [Address 0380
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
page 19 of 354
to 039A
16
]
16
b7
]
16
is selected (Note)
IN
Timer A0 register [Address 0387
Timer A1 register [Address 0389
Timer A2 register [Address 038B
b0
Timer A3 register [Address 038D
Timer A4 register [Address 038F
to FFFF
16
16
]
16
Start count
]
16
b0
Trigger select register [Address 0383
TRGSR
Timer A1 event/trigger select bit
b1 b0
0 0 :
Input on TA1
is selected (Note)
IN
Timer A2 event/trigger select bit
b3 b2
0 0 :
Input on TA2
is selected (Note)
IN
Timer A3 event/trigger select bit
b5 b4
0 0 :
Input on TA3
is selected (Note)
IN
Timer A4 event/trigger select bit
b7 b6
0 0 :
Input on TA4
is selected (Note)
IN
, 0386
] TA0
16
16
, 0388
] TA1
16
16
, 038A
] TA2
16
16
, 038C
] TA3
16
16
, 038E
] TA4
16
16
2. Timer A
]
16

Advertisement

Table of Contents
loading

Table of Contents