Rev. 1.40
1��
De�e��e� 1�� �01�
Rev. 1.40
1�3
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
Periodic Type TM – PTM
The Periodic Type TM contains five operating modes, which are Compare Match Output, Timer/
Event Counter, Capture Input, Single Pulse Output and PWM Output modes. The Periodic TM can
also be controlled with two external input pins and can drive two external output pin.
Device
PTM Core
PTM Input Pin
PTM Output Pin
BS�7F340
BS�7F3�0
BS�7F3�0
BS�7F370
10-�it PTM
PTCK� PTPI
PTP� PTPB
f
SYS
f
SYS
/4
f
H
/64
f
H
/16
f
SUB
PTCK
000
001
010
011
100
101
110
111
PTCK�~PTCK0
10-�it Count-up Counte�
10-�it Co�pa�ato� P
CCRP
�0~�9
�0~�9
10-�it Co�pa�ato� A
PTON
PTPAU
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
PTP
PTOC
PTM1� PTM0
PTIO1� PTIO0
PTMAF Inte��upt
PTMPF Inte��upt
PTPOL
PxSn
CCRA
PTCCLR
Edge
Dete�to�
PTPI
PTIO1� PTIO0
f
SUB
1
0
Pin
Cont�ol
IFS
PTCAPTS
PTPB
Periodic Type TM Block Diagram
Periodic TM Operation
The size of Periodic TM is 10-bit wide and 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 and CCRA comparators are 10-bit wide whose value is
respectively compared 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 PTON 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 PTM interrupt signal will also usually be generated. The Periodic
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 the output pins. All operating setup conditions
are selected using relevant internal registers.