-
从串口读取数据,有两种方法,1、每接收一个EV_RXCHAR,就用ReadFile读一次,这样我觉得太恐怖了。2、接收到一个EV_RXCHAR后,等一定数据量的...
从串口读取数据,有两种方法,1、每接收一个EV_RXCHAR,就用ReadFile读一次,这样我觉得太恐怖了。2、接收到一个EV_RXCHAR后,等一定数据量的CPU周期(GetTickCount),再一次性读取缓冲区里的数据。这样做,一般情况下不会有问题,但是,如果数据很多,过了“一定数据量的CPU周期”,还没收完数据怎么办?就会少读数据了。 我用三个线程序来完成串口数据的接收,其实就是第一种方法的变种: 一个侦听EV_RXCHAR,一个对EV_RXCHAR进行分析,其实就是超时判断。如果接收到一个消息后,一段时间没收到下一个EV_RXCHAR,就认为是一个数据包的结束。这个线程就会通知数据接收线程,进行数据接收。一般同一包数据,两个字符之间的时间间隔,应该很小了吧,而两个数据包之间的间隔,应该不会太小吧!(这个地方我不清楚,猜的:( :) )最后一个线程,是接收数据的。-read data from the serial port, there are two methods, one, each receiving a EV_RXCHAR, on the ReadFile read, I think this vote. 2, received a EV_RXCHAR after a certain volume of data, such as CPU cycles (GetTickCount), and the one-time reader, the data buffer. To do so, under normal circumstances there is no problem, but if many of the data, and after a "certain amount of data the CPU cycles," also confiscated End Data how do? Few will read the data. I used three lines to complete serial data reception, the first method is a variant : an interception EV_RXCHAR, one pair of EV_RXCHAR analys
- 2023-03-23 09:55:03下载
- 积分:1
-
W77E58 dual serial communication source code Note : This program is for referenc...
W77E58双串口通信源代码
注:此源程序只作参考,内有些函数未有原型,借鉴在于其通信方式及其设置。
CRC检校可另参考其它代码。
-W77E58 dual serial communication source code Note : This program is for reference only, not some function prototype experiences in his means of communication and set up. CRC calibration can be a reference to other codes.
- 2022-02-16 06:53:32下载
- 积分:1
-
专业串口通信设计控件(非源码),可用于VB,VC++,Delphi,.NET等开发语言...
专业串口通信设计控件(非源码),可用于VB,VC++,Delphi,.NET等开发语言-professional Serial Communication Design Control (source) that can be used VB, VC, Delphi,.NET development languages
- 2022-06-16 13:40:39下载
- 积分:1
-
在VB下对串口COMM控件编程和发机制进行了详细地设计,同时可以为串口调试用,不失为一个好工具。习惯于VB编程的朋友可以CC一下了。...
在VB下对串口COMM控件编程和发机制进行了详细地设计,同时可以为串口调试用,不失为一个好工具。习惯于VB编程的朋友可以CC一下了。-in VB Serial COMM under the control programming and the mechanisms to perform detailed design, while it used to debug serial port, is a good tool. Accustomed VB CC friends out.
- 2023-07-06 22:00:04下载
- 积分:1
-
一个串口测试程序,包括源代码,供大家学习
一个串口测试程序,包括源代码,供大家学习-A serial test procedure, including the source code for everyone to learn
- 2022-01-25 19:07:38下载
- 积分:1
-
使用WINDOWS API接口,已封装成WINAPI动态库,可直接使用
使用WINDOWS API接口,已封装成WINAPI动态库,可直接使用-use Windows API interface, Packaging has become WINAPI DLL can be used directly
- 2022-02-16 00:26:08下载
- 积分:1
-
Serial debugging assistant to support a variety of data conversion, but also to...
串口调试助手,支持各种数据转换,也可保存接收的数据-Serial debugging assistant to support a variety of data conversion, but also to receive data can be stored
- 2022-06-01 18:55:45下载
- 积分:1
-
VC的串口同步例子
VC的串口同步例子-VC Synchronous Serial example
- 2022-03-01 14:59:55下载
- 积分:1
-
异步串口通信 VC++ 本文参考MSDN及相关网上文章。 ////////////////////////////////////////////// //My...
异步串口通信 VC++ 本文参考MSDN及相关网上文章。 ////////////////////////////////////////////// //MyComm.h 多机控制 异步串口通信 //说不定能有用上的。-asynchronous serial communication VC paper and related reference MSDN online article. //////////////////////////////////////////////// MyComm. h multi-machine control asynchronous serial communication// may also be useful for the latter.
- 2022-03-13 17:22:20下载
- 积分:1
-
在Windows CE上用串口采集数据并绘制成曲线,适合于数据采集,硬件平台是ARM开发板...
在Windows CE上用串口采集数据并绘制成曲线,适合于数据采集,硬件平台是ARM开发板-在Windows CE上用
- 2022-02-09 15:50:28下载
- 积分:1