Touch配置快捷方法

基于STC8H4K64TL单片机的触摸功能调试 main.c#define uchar unsigned char//自定义无符号字符型为uchar#define uint unsigned int//自定义无符号整数型为uint#define ul unsigned long int//自定义无符号长整数型为ul//位定义LED灯的单片机引脚void PortModeSet()//单片机端口模式设置函数//设置P0.0~P0.3为高阻输入//设置P0.4为准双向口 P0.5~P0.7为推挽输出//设置P1.0~P1.3为高阻输入。 阅读详情

一、概述

本文以APT32F1023 为例介绍了触摸按键应用时在程序配置快捷步骤,目前提供的库有STD和CSI两种风格代码,触摸部分参数基本一致,配置方式类似。下面以STD库为例描述触摸配置典型四步骤,四步骤配置完基本满足大部分产品应用,特殊应用或者特殊测试需要再针对性调整其他参数,本文不作详细介绍。

二、配置步骤

第一步:使能触摸引脚

TK_IO_ENABLE=TCH_EN(4)|TCH_EN(5)|TCH_EN(7)|TCH_EN(8);

第二步:选择C0电压(扫描电压配置)

  Touch 的扫描电压通过三个变量配置:TK_PSEL_MODE、TK_FVR_LEVEL、TK_EC_LEVEL。

  TK_PSEL_MODE 可以配置成芯片的VDD、FVR

  TK_FVR_LEVEL 可以配置成FVR_2048、FVR_4096

  TK_EC_LEVEL 可以配置成1V、2V、3V、3.6V

TK_PSEL_MODE = TK_PSEL_AVDD;
TK_FVR_LEVEL = TK_FVR_2048V;
TK_EC_LEVEL  = TK_EC_3V;

注意:

  1.PSEL_MODE 选择FVR 时,PA0.2(TCH3)不能再做触摸输入功能,且必须接一颗104 电容到地。

  2.FVR_LEVEL 可以选择2.048V 或者4.096V,如果PSEL_MODE 选择的是VDD,那此参数配置无效。选择的FVR 参考电压必须比VDD 电压小500mV 以上。比如VDD 为3.3V,那FVR 只能选择2.048V。

  3. EC_LEVEL 为C0 脚的充放电电压,必须比VDD 电压小500mV 以上。比如VDD 为3.3V,那么

8051内核锦锐MCU开发指南:CA51F3系列 锦锐MCU开发指南:CA51F3系列一、锦锐MCU简介二、CA51F3系列简介三、CA51F351P6资源四、技术资料下载开发环境搭建 一、锦锐MCU简介 公司官网:深圳市锦锐科技有限公司 http://www.cachip.com.cn 主要产品:   8 bit Flash单片机系列    * CA51F0系列(AD + PWM类型)    * CA51F2系列(LCD + 触摸类型)    * CA51F3系列(AD + 触摸类型)    * CA51F4系列(LCD驱动升压类型)    * CA51 阅读详情

相关推荐

08.2、程序:FreeRTOS+LCD+Touch+UART1.zip

基于FreeRtos操作系统 ,实现了:屏幕会展示显示汉字、不同字号的英文、图形,并且可以变换颜色,可以触摸显示,可以通过串口与电脑通信。程序基于神舟IV号开发板实现的。

APT32F1023资料包.rar

APT32F1023资料包

uart_two&touch_event82_stm32双uart通信_touch/uart_touch_STM32F767_源

该程序基于STM32F767实现双串口通信交互、触摸屏交互实验。

【Python】SUMO + Python 联合仿真平台

强化学习的核心思想是让智能体 (Agent) 通过与环境 (Environment) 的交互来学习如何做出最优决策,以最大化累积奖励 (Cumulative Reward)。在交通场景中,智能体可以是交通信号控制器、自动驾驶车辆或交通管理中心,环境则是 SUMO 模拟的交通路网,奖励则与交通效率、安全、环保等目标相关。交通系统本质上是动态的、随机的、高度复杂的系统,传统的基于规则或模型的优化方法在面对不断变化的需求和突发事件时,往往显得力不从心。强化学习的优势在于:在交通领域,强化学习已经被广泛应用于:为了

宅男很神经 1970

ESP32天线阵列实现Wi-Fi空间成像与无直视定位

Wi-Fi信道状态信息(CSI)是OFDM系统中表征多径传播特性的基础物理层参数,其复数值包含幅度与相位,可反映无线环境的空间特征。基于CSI的射频感知技术,通过提取子载波级信道响应,结合阵列信号处理,实现到达角(AoA)估计与深度映射,本质是将通信链路重构为空间域传感器。该技术无需专用雷达硬件,具备低成本、被动式、隐私友好等工程优势,在室内定位、行为识别、仓储导航等场景具有广泛落地价值。本文聚焦ESP32平台,详解多芯片相位同步、CSI零拷贝采集、嵌入式MUSIC算法及信道图谱轻量化部署等关键实现。

weixin_30632267的博客 231

【通信原理 入坑之路】—— 详解IQ调制以及星座图原理

文章目录一. IQ调制与解调的原理与过程二.PSK(相移键控)和IQ调制的关系:2.1 用IQ调制实现QPSK调制 一. IQ调制与解调的原理与过程 IQ调制的定义是:“IQ调制就是数据分为两路,分别进行载波调制,两路载波相互正交。I是in-phase(同相), q是 quadrature(正交)” 我们通过下面的示意图介绍IQ调制的过程: 首先,信号分成两路:I路和Q路(为了方便理解我们把这两...

凝望,划过星空的博客 11万+

地瓜派RDK X5部署YOLOv11n避坑指南:手把手教你解决Softmax算子导致的性能暴跌问题

本文详细介绍了在地瓜派RDK X5开发板上部署YOLOv11n模型时遇到的性能问题及解决方案。通过强制BPU部署Softmax算子,成功将推理速度从7FPS提升至47FPS,并提供了完整的优化流程和技术细节,帮助开发者避免类似性能陷阱。

weixin_42629671的博客 263

别再凭感觉了!手把手教你用Excel搞定激光器MPE与NOHD安全计算(附模板下载)

本文详细介绍了如何利用Excel自动化计算激光器的MPE(最大允许照射量)和NOHD(标称眼危害距离),提升激光安全评估的效率和准确性。通过实战案例和模板下载,帮助工程师快速掌握GB/T 7247标准中的关键计算,避免常见错误,适用于激光测距仪等设备的安评工作。

weixin_30954265的博客 458

基于 LSTM 的船舶轨迹预测,单步预测

基于 LSTM 的船舶轨迹预测,单步预测

fyuhao的博客 1万+

【AI大模型:前沿】44、大模型+机器人:从自动化工具到通用智能体的技术革命与应用全景

大模型与机器人的融合催生了“具身智能体”,突破传统机器人智能化缺失、功能单一等瓶颈。大模型赋予机器人三大能力:常识推理(如热牛奶需去包装)、模糊指令解析(如“整理书桌”拆解步骤)、零样本任务泛化(如搭乐高桥)。技术实现上,通过多模态融合(视觉-语言-动作)、仿真训练(虚拟试错)和实时反馈(动态调整动作)形成闭环。主流框架如Google RT-2(端到端动作生成)、斯坦福Q-Transformer(强化学习优化)和Figure 01(ChatGPT驱动人形机器人)各具优势,可适配工业、家庭等场景。该技术正重塑

2025博客之星Top81。专注AI工程化与架构实战。从分布式思维到模型部署,用工程化视角为你厘清AI落地的真实路径。 2003

Stable Diffusion 模型分享:Indigo Furry mix(人类与野兽的混合)

Indigo Furry mix 是一个混合模型,出的图具有雄性人类的体型和野兽的形态。条目内容类型大模型基础模型SD 1.5来源CIVITAI作者indigowing文件名称文件大小1.99GB。

水滴的博客 1826

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

上一篇: 各种复位的效果都一样吗?
下一篇: 结构体对齐方法应用与解析
APTCHIP
博客等级 码龄3年 25粉丝 50原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值