Renesas M16C Series User Manual page 34

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

Advertisement

M30245 Group
www.DataSheet4U.com
Figure 2.2.19. Set-up procedure of two-phase pulse signal process in event counter mode,
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
Selecting event counter mode and functions
b7
b0
Timer Ai mode register (i= 3, 4) [Address 0399
1
1
0
1
0
0
0
1
TAiMR (i= 3, 4)
Selection of event counter mode
0 (Must always be "0" when using two-phase pulse signal processing)
0 (Must always be "0" when using two-phase pulse signal processing)
1 (Must always be "1" when using two-phase pulse signal processing)
0 (Must always be "0" when using two-phase pulse signal processing)
Count operation type select bit (Note 1)
1 : Free-run type
Two-phase pulse signal processing operation select bit
1 : Multiply-by-4 processing operation
Note 1: First set to "Reload type" operation. Once the first counting pulse has occurred,
the timer may be changed to "Free-Run type".
Two-phase pulse signal processing select bit
b7
b0
Up/down flag [Address 0384
UDF
Timer A3 two-phase pulse signal processing select bit
1 : Two-phase pulse signal processing enabled
Timer A4 two-phase pulse signal processing select bit
1 : Two-phase pulse signal processing enabled
Setting trigger select register
b7
b0
Trigger select register [Address 0383
TRGSR
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
Note 2: Set the corresponding port direction register to "0".
Setting divide ratio
(b15)
(b8)
b7
b0
b7
Setting count start flag
b7
b0
Count start flag [Address 0380
TABSR
Timer A3 count start flag
Timer A4 count start flag
multiply-by-4 mode selected
page 25 of 354
]
16
]
16
is selected (Note 2)
IN
is selected (Note 2)
IN
b0
Timer A3 register [Address 038D
Timer A4 register [Address 038F
Can be set to 0000
to FFFF
16
16
]
16
Start count
, 039A
]
16
16
, 038C
] TA3
16
16
, 038E
] TA4
16
16
2. Timer A

Advertisement

Table of Contents
loading

Table of Contents