English
Language : 

M16C62_M Datasheet, PDF (340/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
Timer A
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Selecting event counter mode and functions
b7
b0
01 0 10 0 0 1
Timer Ai mode register (i= 2, 3) [Address 039816, 039916]
TAiMR (i= 2, 3)
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
1 : Free-run type
Two-phase pulse signal processing operation select bit (Note 1)
0 : Normal processing operation
Note 1: This bit is valid for timer A3 mode register. For timer A2 mode register, this bit can be “0” or “1”.
Setting two-phase pulse signal processing select bit
b7
b0
Up/down flag [Address 038416]
UDF
Timer A2 two-phase pulse signal processing select bit (Note 2)
1 : Two-phase pulse signal processing enabled
Timer A3 two-phase pulse signal processing select bit (Note 2)
1 : Two-phase pulse signal processing enabled
Note 2: Set the TAiIN, TAiOUT corresponding port direction register to “0”.
Setting trigger select register
b7
b0
Trigger select register [Address 038316]
TRGSR
Timer A2 event/trigger select bit
b3 b2
0 0 : Input on TA2IN is selected (Note 3)
Timer A3 event/trigger select bit
b5 b4
0 0 : Input on TA3IN is selected (Note 3)
Note 3: Set the corresponding port direction register to “0”.
Setting counter value
(b15)
b7
(b8)
b0 b7
b0 Timer A2 register [Address 038B16, 038A16] TA2
Timer A3 register [Address 038D16, 038C16] TA3
Can be set to 000016 to FFFF16
Setting count start flag
b7
b0
Count start flag [Address 038016]
TABSR
Timer A2 count start flag
Timer A3 count start flag
Start count
Figure 2.2.17. Set-up procedure of 2-phase pulse signal process in event counter mode, normal mode selected
2-23