Rev. 1.40
1��
De�e��e� 1�� �01�
Rev. 1.40
1�7
De�e��e� 1�� �01�
BS67F340/BS67F350/BS67F360/BS67F370
Enhanced Touch A/D Flash MCU with LCD Driver
BS67F340/BS67F350/BS67F360/BS67F370
Enhanced Touch A/D Flash MCU with LCD Driver
Compact Type TM – CTM
Although the simplest form of the 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 pin.
Device
CTM Core
CTM Input Pin
CTM Output Pin
Note
BS�7F340
BS�7F3�0
BS�7F3�0
BS�7F370
10-�it CTM
(CTM0� CTM1)
CTCK0� CTCK1
CTP0� CTP0B
CTP1� CTP1B
n=0 ~ 1
f
SYS
f
SYS
/4
f
H
/64
f
H
/16
f
SUB
CTCKn
000
001
010
011
100
101
110
111
CTnCK�~CTnCK0
10-�it Count-up Counte�
3-�it Co�pa�ato� P
CCRP
�7~�9
�0~�9
10-�it Co�pa�ato� A
CTnON
CTnPAU
Co�pa�ato� A Mat�h
Co�pa�ato� P Mat�h
Counte� Clea�
0
1
Output
Cont�ol
Pola�ity
Cont�ol
Pin
Cont�ol
CTPn
CTnOC
CTnM1� CTnM0
CTnIO1� CTnIO0
CTMnAF Inte��upt
CTMnPF Inte��upt
CTnPOL
PxSn
CCRA
CTnCCLR
f
SUB
CTPnB
Compact Type TM Block Diagram – n=0 or 1
Compact TM Operation
The Compact TM 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-bit wide whose value is compared with the highest three bits in the
counter while the CCRA is ten-bit wide 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 CTnON 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.