Compact Type Tm - Ctm; Compact Type Tm Operation - Holtek BS86DH12C Manual

High voltage touch a/d flash mcu with hvio
Table of Contents

Advertisement

Step 2. Write data to High Byte xTMnAH or PTMRPH
– 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 CCRP
Step 1. Read data from the High Byte xTMnDH, xTMnAH or PTMRPH
– 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 xTMnDL, xTMnAL or PTMRPL
– This step reads data from the 8-bit buffer.
Compact Type TM – CTM
The Compact Type TM 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.
f
/4
000
SYS
f
001
SYS
f
/16
010
H
f
/64
011
H
f
100
SUB
f
101
SUB
CTnON
110
CTnPAU
CTCKn
111
CTnCK2~CTnCK0
Note: The CTMn external pins are pin-shared with other functions, so before using the CTMn function the relevant
pin-shared function registers must be set properly.

Compact Type TM Operation

The size of Compact 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 comparator is 3-bit wide whose value is compared with
the highest 3 bits in the counter while the CCRA is the 10 bits and therefore compares 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 CTMn 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.
Rev. 1.00
High Voltage Touch A/D Flash MCU with HVIO
CTM Core
CTM Input Pin
10-bit CTM
CTCK0
(CTM0, CTM1)
CTCK1
CCRP
Comparator P Match
3-bit Comparator P
b7~b9
Counter Clear
10-bit Count-up Counter
b0~b9
Comparator A Match
10-bit Comparator A
CCRA
Compact Type TM Block Diagram (n=0~1)
80
CTM Output Pin
CTP0, CTP0B
CTP1, CTP1B
CTMnPF Interrupt
CTnOC
0
Output
Polarity
1
Control
Control
CTnCCLR
CTnM1~CTnM0
CTnPOL
CTnIO1~CTnIO0
CTMnAF Interrupt
BS86DH12C
CTPn
CTPnB
October 26, 2018

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BS86DH12C and is the answer not in the manual?

Table of Contents