登录
首页 » c » STC15W4K32S4循环扫描 8×8 薄膜压阻传感阵列

STC15W4K32S4循环扫描 8×8 薄膜压阻传感阵列

于 2022-01-29 发布 文件大小:48.67 kB
0 135
下载积分: 2 下载次数: 1

代码说明:

单片机C语言扫描程序主要包括串口通讯程序, ADC采样程序两部分。 通过扫描程序, 实现将采集数据循环发送到上位机进行实时显示。 1.串口通讯程序 (1) 串口初始化 选择串口 1 向PC发送数据, 采样方式 1, 即固定格式的 10 位串口通讯方式。选择定时器T2作为串口波特率发生器,波特率为9600bps,时钟频率为22.1184MHZ,定时器分频模式为 1T模式, 即每个时钟周期计数器加 1, 速度是传统 8051 单片机的 12 倍, 使用 16 位自动重装的方式 0。 设置串口中断, 并在中断处理程序中清除中断标志TI。当延时 1ms以内, 等待A/D转换供电稳定, 将P1 口模拟功能控制寄存器P1ASF8 位全部置 1, 设置变量ch表示循环打开的A/D通路, 设置最高转换速度即 90 个时钟周期转换一次, 转换完成标志清 0。 多通道模拟量进行A/D转换时, 更换A/D通道后要延时 20μs~200μs, 使输入电压稳定。 启动 A/D 转换, 等待A/D转换结束, 将标志位status置 1, 返回A/D转化字节结果。 (2) 串口发送字节函数 将字节放入到串口 1 数据缓冲寄存器SBUF中, 单片机将发送缓冲区中的数据发送到PC中。 (3) 串口发送字符串函数 将A/D转化数据以字符串形式发送, 调用串口发送字节函数将字符串按字节发送到PC中。 2. A/D采样程序

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • shenliu
    有限元计算基本程序,为毕业论文时编写的局部渗流计算程序。(Finite element method the basic procedures for the thesis prepared by local seepage calculation procedures.)
    2007-08-20 14:00:54下载
    积分:1
  • . net2.0 VS2005 batch file read, slideshow functionality, picture switch convers...
    .net2.0 VS2005 文件批量读取,幻灯演示功能,图片切换转换功能,GDI功能联调-. net2.0 VS2005 batch file read, slideshow functionality, picture switch conversion, GDI functions FBI
    2022-12-15 16:00:04下载
    积分:1
  • IAR
    讲述IAR环境如何的使用简明教程,适合初步接触IAR的初学者使用(How about the use of IAR environment, simple tutorial for beginners to use the initial contact IAR)
    2011-01-19 11:13:52下载
    积分:1
  • vaccumbreaker
    真空断路器灭弧室涡流场计算的实例,是关于纵向触头结构方面的分析。(Vacuum circuit breaker chamber eddy current field calculation example of contact structure on the longitudinal analysis.)
    2010-03-16 14:23:18下载
    积分:1
  • 雷达仿真的c程序
    雷达仿真的c程序,我自己写的 站长大人,情尽快开通帐号,救急(radar simulation c procedure, I wrote the director of adults, and a quick opening of account and save)
    2007-04-11 19:01:01下载
    积分:1
  • area
    定义一个基类MyGraph,要求有一个纯虚函数double Area()=0。从基类派生一个圆类Circle和矩形类Rectangle,再由Rectangle类派生出Square类,分别给出Area()实现。 重载“>>”,实现对图形信息的输入。在主函数中计算三种形状的面积,并显示输出。 (Define a base class MyGraph, requires a pure virtual function double Area () = 0. Derive a circle and a rectangle class Rectangle Circle class from the base class, and then by Square Rectangle class derived class, are given Area () implementation. Reload " > > " to achieve the input of graphical information. Calculate the shape of the three main functions in the area, and display output.)
    2014-02-07 23:13:19下载
    积分:1
  • C# 向SQL Server数据库中批量写入超多数据
    Visual C# 向SQL Server数据库中批量写入海量数据,这个虽然不是“大数据”,但这个海量数据也是很考验SQL的负载能力和代码的执行效率。那么C#如何实现效率高、速度快的数据写入呢,这个例子是来自C#开发实战1200例(第Ⅱ卷)中的代码改良,请下载源码后查看,里面有注释。
    2022-04-17 17:11:12下载
    积分:1
  • 这是刚刚上传的服务器端,多
    这是刚刚上传的服务器端,多-This is just uploaded to the server side, and s
    2022-04-29 04:09:14下载
    积分:1
  • Graphic
    MFC的CDC画图教学文档,易于上手,学起来容易,有很多例子说明。(MFC' s CDC drawing teaching documents, easy to use, easy to learn, there are many examples.)
    2014-05-29 21:28:36下载
    积分:1
  • PipeCNN-master
    关于caffe的流水线性的加速,利用xilinx的SDAccel开发工具进行fpga加速(On the linear acceleration of the flow of Caffe, using the SDAccel development tool of Xilinx to accelerate the FPGA acceleration)
    2018-03-13 10:25:27下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载