C# 编写的串口通信程序
如果,翻看我之前的博客,会找到一篇用I/O模拟IIC通信的程序文章。好吧,如果找不到可以点击这里,这里就不在赘述了,系统也已经完全调试通过了。
今天的任务是,把测试得到的数据在上位机的界面上显示出来,于是键盘手花了两天的时间模仿着巨人的肩膀通过了用C#编写的界面程序,界面很简单就像下面显示的一样。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAALIAAACHCAIAAAA9X5QhAAAD8UlEQVR4nO3dwU7cMBRG4bz/q1RddYnY8BAg1EWlIlWCQdRvkC5o05D727nEGdtxzidUDRkHoclpnIIzHQJgDLW/AbSILCCQBQSygEAWEMgCAllAIAsIZAGBLCCQBQSygEAWEMgCAllAIAsIZAGBLCCQBQSygEAWEMgCAllAIAsIB8ji/uHx5vbuy9dvfCQ+bm7v7h8e93rND5DFz6eX59cwIun5NXz/8Wuv1/wYWdR+zY+BLCCQBQSyOKrhH7vdv9fw0TSMLA5pfggXjxNZ2L1ig8nikGQW6SMt9yKLEDrKYuI/0tOY2CQyH1Yhi8V8lh65xzf2X2dZJM4Z/vFyS6Es5gc49jiYYvwBOfWUhTyusetQu0sTWYRZAYmDPR9jN+brJgvnKSHxlJ1xKv9LhLNFvsUrY5+aHsd2TGwZW7u2cJ4tNlfSTRbXVuHawjMsfZ4gi2srfW2Rnh12vIyQyMKp9CQyxbH4c/HsNS4sAlm4Fc1iOsDpLIK6FJVf57PIwqnCJCL/nI9ZPObaorzSl5z+LELG4Y9hdZZH6dVZ8qJhMbPMh8lPc1wub0/Pv/lY/bhc3vJf7XcH+FUZyiMLCGQBgSwgkAUEsoBAFhDIAgJZQCALCGQBgSwgHCAL3vaEtz0R+MW6B297Aq2tld+77JVAFk7NrfxOL9XJRBZOdVZ+x7bI9Zs7njN6ymL627LY6NllvqP8OhWy4GyRb4jcq76aRezBWPeO9V3OFpsr6TuLce1sYYdVziJ88q6y9HmCLMZNk0hiTOVJ5O9QcyvAfPv1dJNFztnCjrFbSt8QMH9gpwzPGSUHWdgxcpcW70EN5rRhPz35JLJXFrHxFd4NJ/gmkfRV6smzGH1vYLJ6GbE4JU/b6/yU03ltseP08a6nLK7qXDcbkoUTvyqDQBYQyAICWUA4XRaszlp1utVZvO0Jb3uCJpAFBLKAQBYQyAICWUA4QBbcbMjNhgI/zvI43Y+z+OG3U521nLWQhVNDy3DSA1iGU1KdtZw5Y3L0lIVcubnYsnmvoms5V08DQ3LBd75ushjMOl67JWevti45nVlsnlM6ziL2bHqv+ll4rhjIwil2ONOTSItZ6H0iNwqk69msmyzG5H+dfaSzhd5n09lis56ymJw0CxsHk8ho3oygq0vOwdw4ZJ+V28nCziByy4a9xupZhI/HmEmkEfWzCOYG9pj8b5EsnJrIohiycCILCGQBgSwgnC4LVmetOt3qLG425GZDNIEsIJAFBLKAQBYQyAICWUAgCwhkAYEsIJAFBLKAQBYQyAICWUAgCwhkAYEsIJAFBLKAQBYQyAICWUAgCwhkAYEsIJAFBLKAQBYQ/gDbhtRj+kMp4gAAAABJRU5ErkJggg==" alt="" />
下面就一步一步给大伙展示一下我的程序吧。
C#非常的强大而且友好,串口的通信可以通过编程环境(这里我用的是Visual Studio 2010),如果有需要的话可以给我信息,我有完整版的安装包。如下图,简单的调用和选择就完成了串口的基本配置。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARkAAABaCAIAAAADybU2AAAP1klEQVR4nO2d61NT19rA8/l8c/qR/gF05uiZdxw7cyhDjzOtQ8609X3NHGiPygHzkoIKGDiFQgXFE6HaHgpYjEBAUAJBEAUlB4nQAFEw5aJcvEBCCBCu4U7IPev9kNvOlZCsQHh9fvN82O7uvdaz0/XLevYmWSEhb2l40qs3IJ3e0N0vUqn1inVld79obVO3OC57HXVyZmxa+lv3UGKCZEY5Nq08QqbuvAcpk0JlShBCCEnY5GDztgfw0sPIZdKd97i7tDOCPgqjt1v/iSlnKZNCaBbwMyqVislkKhQKktdN1D5+odMjrdbwW/ebpRfCsbPfPuM0La9rRVmZwsJi2aJaOqMYjj492jv6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qPh3KUxwgCiU04G6Pa1limTCw8HZvQbi8tx85DUam1st4qOgphTHrb6nMwBoA05ftW+VBFZ64rSdWxS8ILI2Ilxjudh31NpH7ZjPdBemjl38DyGmTHPs8hgbBsYmFszYx6ABwysQUulUggb5H8AHjAwt2bBg/wPwAMG5taMmOc7zyIDeMDA3JoR8wA8YGCNWiqVQtgg/wPwgIG5NQse5H8AHjAwtwYxDxiYR4OYBwzMo0HMAwbm0SDmAQPzaBDzgIF5NIh5wMA8WiqV2vedZ/d959mOnr59AA8YmHuz4OnuHQR4wMAaMBTz7PvO3yADeMDA3BqKeQAeMLCGLZVKIWyQ/wF4wMDcmgUP8j8ADxiYW4OYBwzMo0HMAwbm0SDmAQPzaHTMkwKBQK5FxDzdvYP74n+DDD7DZ/js/rMy+ONfDf74V4N/+/fGh+Z9/ttfHlZ/+uR/Gezo+a/74t9Hu+/o6bMOBT7D52h9VvS90t2799L/MfuPw+/+t5/9ryf+88sdPd/fF47rB3yGz94+K3fu3Ll79y76e/fu3Xv37t3FdOfOHfRVrVa7ffu2teT27dvWJnfu3KnVatZXVoF4ybVa7c6dO/fu3fvmm29m5xd/9PobB//TUQvl8FxL4DN8dv/5/wMAG/hca/4W7QAAAABJRU5ErkJggg==" alt="" />
下面主要就是编程的问题了,在窗体Load的进程中可以完成串口的启动
private void Form1_Load(object sender, EventArgs e)
{
serialPort1.PortName = "COM4";
serialPort1.BaudRate = ;
serialPort1.Open();
this.textBox1.Clear();
thread = new Thread(CrossThreadFlush);
thread.IsBackground = true;
thread.Start();
}
而后就是读取数据的操作,这时候用到事件
private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
在这个事件里面编程就可以了,但是在对窗体内文本进行操作的时候会发现出现了线程的冲突和错误。网上给出的一种解决方法是采用代理的方式具体的程序如下
public partial class Form1 : Form
{
private delegate void FlushClient(); //代理
Thread thread = null;
uint DateTemp;
uint Datefalg = ;
uint counter = ;
uint DateTemp1 = ;
uint TMP1;
uint RH1;
uint PRESS1;
double TMP;
double RH;
double PRESS; public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{
serialPort1.PortName = "COM4";
serialPort1.BaudRate = ;
serialPort1.Open();
this.textBox1.Clear();
thread = new Thread(CrossThreadFlush);
thread.IsBackground = true;
thread.Start();
} private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
counter=counter+;
DateTemp = (uint)this.serialPort1.ReadByte();
if (DateTemp == 0xF1)
{
Datefalg = ;
DateTemp1 = ;
DateTemp = ;
counter=;
}
if (DateTemp == 0xF2)
{
Datefalg = ;
DateTemp1 = ;
DateTemp = ;
counter=;
}
if (DateTemp == 0xF3)
{
Datefalg = ;
DateTemp1 = ;
DateTemp = ;
counter=;
}
if (Datefalg == && DateTemp != 0xF1)
{ if(counter==)
DateTemp1 = DateTemp;
if (counter == )
{
TMP1 = DateTemp1 * + DateTemp;
TMP = (0.01 * TMP1) - ;
} }
if (Datefalg == && DateTemp != 0xF2)
{
if (counter == )
DateTemp1 = DateTemp;
if (counter == )
{
RH1 = DateTemp1 * + DateTemp;
RH = (0.0405 * RH1) - -0.0000028*RH1*RH1;
} }
if (Datefalg == && DateTemp != 0xF3)
{
if (counter == )
DateTemp1 = DateTemp;
if (counter == )
{
PRESS1 = DateTemp1 * + DateTemp;
PRESS = (PRESS1-)*/ + ;
}
}
} private void CrossThreadFlush()
{
while (true)
{
//将sleep和无限循环放在等待异步的外面
Thread.Sleep();
ThreadFunction();
}
} private void ThreadFunction()
{
if (this.textBox1.InvokeRequired)//等待异步
{
FlushClient fc = new FlushClient(ThreadFunction);
this.Invoke(fc); //通过代理调用刷新方法 }
else
textBox1.Text = TMP.ToString("0.00");
if (this.textBox2.InvokeRequired)//等待异步
{
FlushClient fc = new FlushClient(ThreadFunction);
this.Invoke(fc); //通过代理调用刷新方法 }
else
textBox2.Text = RH.ToString("0.00");
if (this.textBox3.InvokeRequired)//等待异步
{
FlushClient fc = new FlushClient(ThreadFunction);
this.Invoke(fc); //通过代理调用刷新方法 }
else
textBox3.Text = PRESS.ToString("0.00"); } }
通过这样的一番调试之后才得以程序正确的运行,由于工科程序员和计算机程序员的编程思想还是有差别的,所以写的不好的地方请轻喷。
【重要通知】
为了丰富给位程序狗&硬件狗们的业余生活,我们做了一个艰难的决定,我们“泡泡鱼工作室”开通了“硬件为王”公共订阅号,微信号:king_hardware。关注智能硬件和互联网创业,以及日常学习资料/搞笑段子推送。请猛扫下面的二维码!
Powered By Bubble_fish ; Email:bubble_fish@yeah.net
C# 编写的串口通信程序的更多相关文章
- Qt编写串口通信程序全程图文解说
(说明:我们的编程环境是windows xp下,在Qt Creator中进行,假设在Linux下或直接用源代码编写,程序稍有不同,请自己修改.) 在Qt中并没有特定的串口控制类,如今大部分人使用的是第 ...
- 转:Qt编写串口通信程序全程图文讲解
转载:http://blog.csdn.net/yafeilinux/article/details/4717706 作者:yafeilinux (说明:我们的编程环境是windows xp下,在Q ...
- Qt编写串口通信程序全程图文讲解 .
在Qt中并没有特定的串口控制类,现在大部分人使用的是第三方写的qextserialport类,我们这里也是使用的该类.我们可以去 http://sourceforge.net/projects/qex ...
- 【转】Qt编写串口通信程序全程图文讲解
本文章原创于www.yafeilinux.com 转载请注明出处. (说明:我们的编程环境是windows xp下,在Qt Creator中进行,如果在Linux下或直接用源码编写,程序稍有不同,请自 ...
- C#中缓存的使用 ajax请求基于restFul的WebApi(post、get、delete、put) 让 .NET 更方便的导入导出 Excel .net core api +swagger(一个简单的入门demo 使用codefirst+mysql) C# 位运算详解 c# 交错数组 c# 数组协变 C# 添加Excel表单控件(Form Controls) C#串口通信程序
C#中缓存的使用 缓存的概念及优缺点在这里就不多做介绍,主要介绍一下使用的方法. 1.在ASP.NET中页面缓存的使用方法简单,只需要在aspx页的顶部加上一句声明即可: <%@ Outp ...
- C语言PIC16 serial bootloader和C#语言bootloader PC端串口通信程序
了解更多关于bootloader 的C语言实现,请加我QQ: 1273623966 (验证信息请填 bootloader),欢迎咨询或定制bootloader(在线升级程序). 新PIC16 Boot ...
- C#--简单的串口通信程序
前几天做毕业设计,其中要用到串口和下位机进行通信,于是自己捣鼓了一个简单的串口通信程序. 在做通信之前要先弄一个SerialPort组件出来,当然也可以通过程序来创建.本次设计中采用的是拖的winfo ...
- 创建C#串口通信程序详解
在.NET平台下创建C#串口通信程序,.NET 2.0提供了串口通信的功能,其命名空间是System.IO.Ports.这个新的框架不但可以访问计算机上的串口,还可以和串口设备进行通信.我们将使用标准 ...
- C#串口通信程序详解
C#串口通信程序详解 摘要:创建C#串口通信程序需要注意什么呢?创建C#串口通信程序的步骤是什么?那么本文就向你详细介绍创建C#串口通信程序集体的内容. 在.NET平台下创建C#串口通信程序,.NET ...
随机推荐
- BAT CMD 批处理文件脚本 -2
http://checheng1988.blog.51cto.com/4725808/1090733 在很多windows程序中会见到很多用扩展名为.bat和.cmd结尾的文件,那么这些文件能干什么呢 ...
- 使用Putty连接VirtualBox的Ubuntu
从vbox中安装了ubuntu server,然后用ssh连过去,发现有一个错误:server unexpectedly closed network connection.猛然发现,ssh没有安装. ...
- EXT--表单AJax提交后台,返回前端数据格式的转换
前言: 前端发送请求至服务端(Java),得到的数据是Java语言对象所表现的形式,经常需要转换为JSON格式的字符串写出至前端:当前端获取后也往往需要将字符串转换为js的对象.本文描述了在EXT作为 ...
- Java多线程——<五>后台线程(daemon)
一.后台线程(守护线程) 学一个东西,最重要的一点就是,为什么要用它? 后台线程区别于普通线程,普通线程又可以称为用户线程,只完成用户自己想要完成的任务,不提供公共服务.而有时,我们希望编写一段程序, ...
- (转)CentOS5.5 下搭建 PHP 环境(最佳的LAMP环境)
本文详细阐述在 Linux 系统中搭建 PHP 环境,由于 PHP 就是由 C 语言编写的,最初也是运行在 Linux 系统中,所以Linux 是 PHP 的最佳环境. 关于本文中使用到的软件,请点击 ...
- EF提供的三种查询方式
這邊簡單介紹一下,ADO.Net Entity Framework 提供的三種查詢方式, Linq to Entities Query Builder Mothed Entity SQL Langua ...
- Class Object
java.lang Class Object java.lang.Object public class Object Class Object is the root of the class hi ...
- WPF / Win Form:多线程去修改或访问UI线程数据的方法( winform 跨线程访问UI控件 )
WPF:谈谈各种多线程去修改或访问UI线程数据的方法http://www.cnblogs.com/mgen/archive/2012/03/10/2389509.html 子线程非法访问UI线程的数据 ...
- C# MessageBox 用法大全(转)
C# MessageBox 用法大全 http://www.cnblogs.com/Tammie/archive/2011/08/05/2128623.html 我们在程序中经常会用到MessageB ...
- Android中ContentProvider的简单使用
1.新建继承ContentProvider的类 package com.wangzhu.demo; import android.content.ContentProvider; import and ...