M16C/62P Group (M16C/62P, M16C/62PT)
15. Timers
Rev.2.41
Jan 10, 2006
Page 154 of 390
REJ09B0185-0241
Figure 15.13
TAiMR Register in PWM Mode
Timer Ai Mode Register (i= 0 to 4)
Address
After Reset
0396h to 039Ah
00h
Bit Symbol
Function
RW
NOTES :
1.
2.
3.
4.
5.
RW
MR2
RW
RW
MR1
External Trigger Select
Bit
(2)
0 : Falling edge of input signal to TAiIN pin
(3)
1 : Rising edge of input signal to TAiIN pin
(3)
Trigger Select Bit
0 : Write “1” to TAiS bit in the TASF register
1 : Selected by TAiTGH to TAiTGL bits
MR3
Bit Name
Operation Mode Select Bit
TA0MR to TA4MR
Symbol
TMOD1
b7 b6 b5 b4 b3 b2 b1 b0
RW
MR0
b1 b0
1 1 : PWM mode
(1)
TMOD0
RW
Pulse Output Function
Select Bit
(4)
0 : Pulse is not output
(TAiOUT pin functions as I/O port)
1 : Pulse is output
(1)
(TAiOUT pin functions as a pulse output pin)
RW
1 1
TCK1
RW
TCK0
RW
16/8-Bit PWM Mode Select
Bit
0 : Functions as a 16-bit pulse w idth modulator
1 : Functions as an 8-bit pulse w idth modulator
Count Source Select Bit
b7 b6
0 0 : f1 or f2
(5)
0 1 : f8
1 0 : f32
1 1 : fC32
Selected by PCLK0 bit in the PCLKR register.
Set this bit to “1” (Pulse is output) to output PWM pulse.
TA0OUT pin is N-channel open drain output.
Effective w hen the TAiTGH and TAiTGL bits in the ONSF or TRGSR register are “00b” (TAiIN pin input).
The port direction bit for the TAiIN pin is set to “0” (= input mode).
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655