
Rev. 1.00
547 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
27 LED Controller (LEDC)
28 T
ouch Key
28
28
Touch Key
Introduction
The touch key function is fully integrated and requires no external components, allowing touch key
functions to be implemented by the simple manipulation of internal registers. Keys are organised
into several groups, with each group known as a module Mn. For the HT32F54231/HT32F54241
devices contain touch key up to 24, having a module number M0 to M5. For the HT32F54243/
HT32F54253 contain touch key up to 28. having a module number M0 to M6. Each module is a
fully independent set of four Touch Keys and each Touch Key has its own oscillator. Each module
contains its own control logic circuits and register set. Examination of the register names will
reveal the module number it is referring to.
Features
▆
Four key oscillator frequencies: 1 MHz / 3 MHz / 7 MHz / 11 MHz
▆
1024 level reference oscillator internal capacitor
▆
Single 16-bit C/F Counter
▆
Three scan modes: Manual mode, Auto scan mode and Periodic auto scan mode
▆
Hardware Upper or lower threshold comparators
▆
Keys are organised into several groups, with each group known as a module
●
For the HT32F54231/HT32F54241, having a module number, M0 to M5
●
For the HT32F54243/HT32F54253, having a module number, M0 to M6
▆
Each module is a fully independent set of four Touch Keys and each Touch Key has its own
oscillator
Function Description
When a finger touches or is in proximity to a touch pad, the capacitance of the pad will increase.
By using this capacitance variation to change slightly the frequency of the internal sense
oscillator, touch actions can be sensed by measuring these frequency changes. Using an internal
programmable divider the reference clock is used to generate a fixed time period. By counting the
number of generated clock cycles from the sense oscillator during this fixed time period touch key
actions can be determined.
Each touch key module contains four touch key inputs which are either dedicated touch key pins or
are shared logical I/O pins. If the desired function is selected using the relevant register bits. Each
touch key has its own independent sense oscillator. There are therefore four sense oscillators within
each touch key module.
During this reference clock fixed interval, the number of clock cycles generated by the sense
oscillator is measured, and it is this value that is used to determine if a touch action has been made
or not.
There are three scan modes contained for the touch key function. The auto scan mode, the periodic
auto scan mode and the manual scan mode are selected using the TKMOD bit filed in the TKCR
register.