English
Language : 

M16C62_M Datasheet, PDF (524/615 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
Timer A Applications
Mitsubishi microcomputers
M16C / 62A Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Initialization of timer A0
b7
b0
0 0 0 0 0 0 0 1 Timer A0 mode register
TA0MR [Address 039616 ]
Selection of event counter mode
Pulse output function select bit
0 : Pulse is not output (TA0out 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
0 (Must always be “0” in event counter mode)
b15
0016
b7
b7
b8 b7
b0
0016
b0 Timer A0 register
TA0 [Address 038716, 038616]
b0
0
Up/down flag [Address 038416]
UDF
Timer A0 up/down flag
0 : Down count
b7
00
b0
One shot start flag [Address 038216]
ONSF
Timer A0 event/trigger select flag
b7 b6
0 0 : Input on TA0IN is selected
b7
b0
1
Count start flag [Address 038016]
TABSR
Timer A0 count start flag
1 : Starts counting
Setting interrupt priority levels in timer A0
b7
b0
Timer A0 interrupt control register [Address 005516]
TA0IC
Interrupt control level (set a value 1 to 7)
Initialization of port P7 direction register
b7
b0
0
Port P7 direction register [Address 03EF16]
PD7
Port P71 direction register
0 : Input mode
Setting interrupt enable flag (I flag)
Figure 3.5.1. Set-up procedure of solution for a shortage of external interrupt pins
2-207