English
Language : 

BC68F0031 Datasheet, PDF (61/148 Pages) Holtek Semiconductor Inc – I/O RF Transparent Transmission Flash MCU
BC68F0031
I/O RF Transparent Transmission Flash MCU
Compact Type TM –CTM
Although the simplest form of the two 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 two external output
pins.
CCRP
fSYS/4
000
fSYS
001
fH/16
010
fH/64
011
fSUB
100
fSUB
101
110
CTON
CTPAU
CTCK
111
CTCK2~CTCK0
3-bit Comparator P
b7~b9
10-bit Count-up Counter
b0~b9
10-bit Comparator A
Comparator P Match
Counter Clear 0
1
CTCCLR
Comparator A Match
CTMPF Interrupt
CTOC
Output
Control
Polarity
Control
CTM1, CTM0 CTPOL
CTIO1, CTIO0
CTMAF Interrupt
Pin Control
PASn
CTP
CTPB
CCRA
Compact Type TM Block Diagram
Compact TM Operation
At its core is a 10-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 three bits wide whose value is compared with the highest three bits in the counter while the
CCRA is the ten bits and therefore compares with all counter bits.
The only way of changing the value of the 10-bit counter using the application program, is to
clear the counter by changing the CTON 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 CTM 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 two output pins. All operating setup conditions
are selected using relevant internal registers.
Compact Type TM Register Description
Overall operation of the Compact TM is controlled using several registers. A read only register
pair exists to store the internal counter 10-bit value, while a read/write register pair exists to store
the internal 10-bit CCRA value. The remaining two registers are control registers which setup the
different operating and control modes as well as the three CCRP bits.
Register
Name
CTMC0
CTMC1
CTMDL
CTMDH
CTMAL
CTMAH
7
CTPAU
CTM1
D7
—
D7
—
6
CTCK2
CTM0
D6
—
D6
—
5
CTCK1
CTIO1
D5
—
D5
—
Bit
4
3
CTCK0 CTON
CTIO0 CTOC
D4
D3
—
—
D4
D3
—
—
2
CTRP2
CTPOL
D2
—
D2
—
1
CTRP1
CTDPX
D1
D9
D1
D9
0
CTRP0
CTCCLR
D0
D8
D0
D8
10-bit Compact TM Register List
Rev. 1.01
61
April 11, 2017