Renesas M16C Series User Manual page 313

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

Advertisement

M30245 Group
Initialization of timer A0
www.DataSheet4U.com
Figure 3.3.2. Set-up procedure of buzzer output
Rev.2.00 Oct 16, 2006
REJ09B0340-0200
b7
b0
Timer A0 mode register
0
0
0
0
0 0
0
0
TA0MR [Address 0396
Selection of timer mode
Pulse output function select bit
0 : Pulse is not output (TA0out pin is a normal port pin)
Gate function select bit
b4 b3
0 0 : Gate function not available (TA0in pin is a normal port pin)
0 (Must always be "0" in timer mode)
Count source select bit
b7 b6
0 0 : f
b15
b8
b7
0F
9F
16
16
b7
b0
b7
b0
Count start flag [Address 0380
1
TABSR
Timer A0 count start flag
Initialization of port P7 direction register
b7
b0
Port P7 direction register [Address 03EF
0
PD7
Buzzer ON
b7
b0
Timer A0 mode register [Address 0396
1
TA0MR
Buzzer OFF
b7
b0
Timer A0 mode register [Address 0396
0
TA0MR
page 304 of 354
]
16
b7 b6
1
0
0
0
1
1
0
1
1
b0
Timer A0 register
TA0 [Address 0387
, 0386
16
]
16
1 : Starts counting
Port P7
direction register
0
0 : Input mode
Pulse output function select bit
1 : Pulse is output (Port P7
is TA0
0
Pulse output function select bit
0 : Pulse is not output
3. Timer A Applications
Count source period
Count
source
f(X
) : 16MH
f(Xc
) : 32.768kH
IN
Z
IN
f
62.5ns
1
f
500ns
8
f
2µs
32
f
976.56µs
C32
]
16
]
16
]
16
output pin)
OUT
]
16
Z

Advertisement

Table of Contents
loading

Table of Contents