Rev. 1.71
84
April 11, 2017
Rev. 1.71
85
April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
Periodic Type TM Register Description
Overall operation of the Periodic TM is controlled using a series of registers. A read only register
pair exists to store the internal counter 10-bit value, while two read/write register pairs exist to store
the internal 10-bit CCRA and CCRP value. The remaining two registers are control registers which
setup the different operating and control modes.
Register
Name
Bit
7
6
5
4
3
2
1
0
PTMnC0 PTnPAU PTnCK2 PTnCKn PTnCK0
PTnON
—
—
—
PTMnCn
PTnM1
PTnM0
PTnIO1
PTnIO0
PTnOC
PTnPOL PTnCKS PTnCCLR
PTMnDL
D7
D6
D5
D4
D3
D2
D1
D0
PTMnDH
—
—
—
—
—
—
D9
D8
PTMnAL
D7
D6
D5
D4
D3
D2
D1
D0
PTMnAH
—
—
—
—
—
—
D9
D8
PTMnRPL
D7
D6
D5
D4
D3
D2
D1
D0
PTMnRPH
—
—
—
—
—
—
D9
D8
10-bit Periodic TM Register List (n=0 or 1)
PTMnC0 Register
Bit
7
6
5
4
3
2
1
0
Name
PTnPAU PTnCK2 PTnCK1 PTnCK0
PTnON
—
—
—
R/W
R/W
R/W
R/W
R/W
R/W
—
—
—
POR
0
0
0
0
0
—
—
—
Bit 7
PTnPAU
:
P
TM Counter Pause Control
0: run
1: pause
The counter can be paused by setting this bit high. Clearing the bit to zero restores normal
counter operation. When in a Pause condition the TM will remain powered up and continue to
consume power. The counter will retain its residual value when this bit changes from low to high
and resume counting from this value when the bit changes to a low value again.
Bit 6~4
PTnCK2~PTnCK0
: Select
P
TM Counter clock
000: f
SYS
/4
001: f
SYS
010: f
H
/16
011: f
H
/64
100: f
TBC
101: f
TBC
110:
P
TCK
n
rising edge clock
111:
P
TCK
n
falling edge clock
These three bits are used to select the clock source for the TM. 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
TBC
is
an
other internal clock, the details of which can be found in the oscillator section.