Newly Defined Button Evaluation Kit - Principle of Touch Button
[Copy link]
Compared with traditional mechanical buttons, touch buttons have advantages such as beautiful appearance, durability and long life. In use, you only need to touch lightly to realize the switch control, quantitative adjustment and even direction control of the button. Touch buttons have been widely used in consumer electronic products. A simple touch button is a capacitive touch button. A capacitive touch button is actually a small copper-plated area, also known as a touch sensing area. The touch sensing area is usually designed to be a size that is convenient for finger touch and is connected to the input capture channel.
From the official PCB, it can be seen that the touch buttons on the board should be capacitive touch buttons.
For general MCUs, capacitive touch buttons require timer input detection to determine whether they are pressed.
In this dedicated key MCU, these implementation details are completely shielded. Users do not need to configure the timer input detection, nor do they need to implement key detection. Only an interface and process for calling the library are open to the outside world. (The purple part in the figure below is the library file, and the other parts are user programs.)
This is the main key flow processing function of the default program of the evaluation board
Although the variable name SOCAPI_TouchKeyStatus is defined in the user program, the flag is actually in a closed Lib library and the user cannot change it to another name.
|