Renesas M16C Series User Manual page 315

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

Advertisement

M30245 Group
www.DataSheet4U.com
Figure 3.4.1. Set-up procedure of solution for a shortage of external interrupt pins
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
Initialization of timer A0
b7
b0
Timer A0 mode register
0
0
0
0
0 0
0
1
TA0MR [Address 0396
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
When not using two-phase pulse signal processing, set this bit to "0"
b15
b8
b7
00
00
16
16
b7
b0
b7
b0
Up/down flag [Address 0384
0
UDF
Timer A0 up/down flag
0 : Down count
b7
b0
Count start flag [Address 0380
1
TABSR
b7
b0
One shot start flag [Address 0382
0 0
0
ONSF
Reserved bit (Must always be "0" )
Timer A0 event/trigger select flag
b7 b6
0 0 : Input on TA0
Note: Set the corresponding port direction register to "0".
Setting interrupt priority levels in timer A0
b7
b0
Timer A0 interrupt control register [Address 0054
TA0IC
Interrupt control level (set a value 1 to 7)
Initialization of port P7 direction register
b7
b0
Port P7 direction register [Address 03EF
0
PD7
Setting interrupt enable flag (I flag)
page 306 of 354
]
16
b0
Timer A0 register
TA0 [Address 0387
, 0386
16
]
16
]
16
Timer A0 count start flag
1 : Starts counting
]
16
is selected (Note 1)
IN
Port P7
direction register
1
0 : Input mode
3. Timer A Applications
]
16
]
16
]
16

Advertisement

Table of Contents
loading

Table of Contents