Rev.2.00 Oct 16, 2006 page 17 of 354
REJ09B0340-0200
M30245 Group
2. Timer A
Figure 2.2.11. Set-up procedure of timer mode, pulse output function selected
Selecting timer mode and functions
Timer Ai mode register (i=0 to 4) [Address 0396
16
to 039A
16
]
TAiMR (i=0 to 4)
Selection of timer mode
b7
b0
0
0
0
0
0 (Must always be “0” in timer mode)
Count source select bit
0 0 : f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
b7 b6
Gate function select bit
0 0 :
0 1 :
b4 b3
Gate function not available (TAi
IN
pin is a normal port pin)
Note: The setting of the corresponding port register and
the direction register are invalid.
1
Pulse output function select bit
1 : Pulse is output (TAi OUT pin is a pulse output pin) (Note)
Count source period
f(X
IN
) : 16MH
Z
f(Xc
IN
) : 32.768kH
Z
b7 b6
Count
source
62.5ns
500ns
2µs
976.56µs
0
0
0
1
1
0
1
1
f
1
f
8
f
32
f
C32
Setting divide ratio
Can be set to 0000
16
to FFFF
16
b7
b0
(b15)
(b8)
b7
b0
Start count
Setting clock prescaler reset flag
(This function is effective when f
C32
is selected as the count source. Reset the prescaler for generating f
C32
by
dividing the X
CIN
by 32.)
Clock prescaler reset flag
0 : No effect
1 : Prescaler is reset (When read, the value is “0”)
b7
b0
Setting count start flag
Count start flag [Address 0380
16
]
TABSR
Timer A0 count start flag
Timer A1 count start flag
Timer A2 count start flag
Timer A3 count start flag
Timer A4 count start flag
b7
b0
Timer A0 register [Address 0387
16
, 0386
16
] TA0
Timer A1 register [Address 0389
16
, 0388
16
] TA1
Timer A2 register [Address 038B
16
, 038A
16
] TA2
Timer A3 register [Address 038D
16
, 038C
16
] TA3
Timer A4 register [Address 038F
16
, 038E
16
] TA4
Clock prescaler reset flag [Address 0381
16
]
CPSRF
Содержание M16C FAMILY
Страница 12: ...Chapter 1 Hardware...
Страница 13: ...See M30245 group datasheet...
Страница 14: ...Chapter 2 Peripheral Functions Usage...
Страница 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Страница 340: ...Chapter 4 External Buses...
Страница 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Страница 362: ...Chapter 5 Standard Characteristics...
Страница 369: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M30245 Group REJ09B0340 0200 User s Manual...