
Rev.2.00 Oct 16, 2006 page 27 of 354
REJ09B0340-0200
M30245 Group
2. Timer A
Figure 2.2.21. Set-up procedure of one-shot mode
Start count
Setting one-shot timer's time
Count start flag [Address 0380
16
]
TABSR
0
Setting count start flag
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
0 : No effect
1 : Prescaler is reset (When read, the value is "0")
Clock prescaler reset flag
One-shot start flag [Address 0382
16
]
ONSF
Setting one-shot start flag
Timer A0 one-shot start flag
Timer A1 one-shot start flag
Timer A2 one-shot start flag
Timer A3 one-shot start flag
Timer A4 one-shot start flag
Setting clock prescaler reset flag
(This function is effective when f
C32
is selected as the count source. Reset the prescaler for generating fc
32
by dividing the X
CIN
by 32.)
Clock prescaler reset flag [Address 0381
16
]
CPSRF
Can be set to 0001
16
to FFFF
16
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
Clearing timer Ai interrupt request bit
Timer Ai interrupt control register
[Addresses 0054
16
, 0045
16
, 0047
16
, 0057
16
, 0059
16
]
TAiIC (i=0 to 4)
Interrupt request bit
(Please refer to the notes on the one-shot timer mode of Timer A.)
0
b7 b0
b7 b0
b7 b0
b7 b0
(b15 (b8)
b7 b0
b7 b0
Selecting one-shot timer mode and functions
External trigger select bit
When internal trigger is selected, this bit can be “1” or “0”
Selection of one-shot timer mode
1 1 0
0 0
0 (Must always be “0” in one-shot timer mode)
Count source select bit
0 0 : f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
b7 b6
Trigger select bit
0 : When the one-shot start flag is set “1”
Timer Ai mode register (i=0 to 4) [Address 0396
16
to 039A
16
]
TAiMR (i=0 to 4)
Count source period
f(X
IN
):16MHz f(X
CIN
):32.768kHz
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
b7 b0
Pulse output function select bit
1 : Pulse is output
Summary of Contents for M16C FAMILY
Page 12: ...Chapter 1 Hardware...
Page 13: ...See M30245 group datasheet...
Page 14: ...Chapter 2 Peripheral Functions Usage...
Page 303: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Page 304: ...Chapter 3 Examples of Peripheral Functions Applications...
Page 340: ...Chapter 4 External Buses...
Page 361: ...THIS PAGE IS BLANK FOR REASONS OF LAYOUT...
Page 362: ...Chapter 5 Standard Characteristics...