English
Language : 

HT66F018 Datasheet, PDF (68/154 Pages) Holtek Semiconductor Inc – A/D Flash MCU with EEPROM
HT66F018
A/D Flash MCU with EEPROM
The following steps show the read and write procedures:
• Writing Data to CCRA or PTM CCRP
♦♦ Step 1. Write data to Low Byte TMxAL or TMxRPL
––Note that here data is only written to the 8-bit buffer.
♦♦ Step 2. Write data to High Byte TMxAH or TMxRPH
––Here data is written directly to the high byte registers and simultaneously data is latched
from the 8-bit buffer to the Low Byte registers.
• Reading Data from the Counter Registers and CCRA or PTM CCRP
♦♦ Step 1. Read data from the High Byte TMxDH, TMxAH or TMxRPH
––Here data is read directly from the High Byte registers and simultaneously data is latched
from the Low Byte register into the 8-bit buffer.
♦♦ Step 2. Read data from the Low Byte TMxDL, TMxAL or TMxRPL
––This step reads data from the 8-bit buffer.
Compact Type TM – CTM
Although the simplest form of the three TM types, the Compact TM type still contains three
operating modes, which are Compare Match Output, Timer/Event Counter and PWM Output modes.
The Compact TM can also be controlled with an external input pin and can drive one external output
pin.
Name
16-bit CTM
TM No.
2
TM Input Pin
TCK2
TM Output Pin
TP2
Compact TM Operation
At its core is a 16-bit count-up counter which is driven by a user selectable internal or external clock
source. There are also two internal comparators with the names, Comparator A and Comparator
P. These comparators will compare the value in the counter with CCRP and CCRA registers. The
CCRP is 8-bit wide whose value is compared with the highest eight bits in the counter while the
CCRA is 16-bit wide and therefore compares with all counter bits.
The only way of changing the value of the 16-bit counter using the application program, is to
clear the counter by changing the TnON bit from low to high. The counter will also be cleared
automatically by a counter overflow or a compare match with one of its associated comparators.
When these conditions occur, a TM interrupt signal will also usually be generated. The Compact
Type TM can operate in a number of different operational modes, can be driven by different clock
sources including an input pin and can also control an output pin. All operating setup conditions are
selected using relevant internal registers.
Rev. 1.70
68
May 04, 2017