Rev. 1.00
66
��ne ��� �01�
Rev. 1.00
6�
��ne ��� �01�
HT66FM5440
Brushless DC Motor A/D Flash MCU
HT66FM5440
Brushless DC Motor A/D Flash MCU
Bit 6~4
PTnCK2~PTnCK0
: Select PTMn Counter clock
000: f
SYS
/4
001: f
SYS
010: f
H
/16
011: f
H
/64
100: f
SUB
101: f
SUB
110: TCKn rising edge clock
111: TCKn falling edge clock
These three bits are used to select the clock source for the PTMn. The external pin
clock source can be chosen to be active on the rising or falling edge. The clock source
f
SYS
is the system clock, while f
H
and f
SUB
are other internal clocks, the details of which
can be found in the oscillator section.
Bit 3
PTnON
: PTMn Counter On/Off Control
0: Off
1: On
This bit controls the overall on/off function of the PTMn. Setting the bit high enables
the counter to run, clearing the bit disables the PTMn. Clearing this bit to zero will
stop the counter from counting and turn off the PTMn which will reduce its power
consumption. When the bit changes state from low to high the internal counter value
will be reset to zero, however when the bit changes from high to low, the internal
counter will retain its residual value until the bit returns high again.
If the PTMn is in the Compare Match Output Mode, PWM output Mode or Single
Pulse Output Mode then the PTMn output pin will be reset to its initial condition, as
specified by the PTnOC bit, when the PTnON bit changes from low to high.
Bit 2~0
Unimplemented, read as "0"
PTMnC1 Register (n=0~3)
Bit
7
6
5
4
3
2
1
0
Name
PTnM1
PTnM0
PTnIO1
PTnIO0
PTnOC PTnPOL PTnCAPTS PTnCCLR
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
0
0
0
0
0
0
0
Bit 7~6
PTnM1~PTnM0
: Select PTMn Operating Mode
00: Compare Match Output Mode
01: Capture Input Mode
10: PWM Output Mode or Single Pulse Output Mode
11: Timer/Counter Mode
These bits setup the required operating mode for the PTMn. To ensure reliable
operation the PTMn should be switched off before any changes are made to the
PTnM1 and PTnM0 bits. In the Timer/Counter Mode, the PTMn output pin control
must be disabled.
Bit 5~4
PTnIO1~PTnIO0
: Select PTMn external pin function
Compare Match Output Mode
00: No change
01: Output low
10: Output high
11: Toggle output
PWM Mode/Single Pulse Output Mode
00: PWM Output inactive state
01: PWM Output active state
10: PWM output
11: Single pulse output
Capture Input Mode
PTnTCLR[1:0]=00B: