xcom串口调试助手源代码
“xcom串口调试助手源代码”相关的资料有哪些?“xcom串口调试助手源代码”相关的范文有哪些?怎么写?下面是小编为您精心整理的“xcom串口调试助手源代码”相关范文大全或资料大全,欢迎大家分享。
串口调试助手源代码
串口调试助手预源代码
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Threading.Tasks; using System.Windows.Forms; using System.IO;
using System.IO.Ports; using System.Threading;
using DevExpress.XtraEditors;
using System.Text.RegularExpressions;
namespace WindowsFormsApplication3 {
public partial class Form1 : XtraForm {
SerialPort sp1 = new SerialPort(); int Flag = 0;
int StateCha
经典的串口调试工具源代码(二)
经典的串口调试工具源代码(二)
Private Sub cmdswitch_Click()
On Error GoTo Err
If MSComm.PortOpen = True Then
ComSwitch = True
Else
ComSwitch = False
End If
If ComSwitch = False Then
StatusBar1.Panels(1).Text = \ mnuconnect.Caption = \ OpenCom ' 打开串口
ComSwitch = True
Else
CloseCom ' 关闭串口
ComSwitch = False
StatusBar1.Panels(1).Text = \
mnuconnect.Caption = \
StatusBar1.Panels(2).Text = \
Statu
C语言串口通信-源代码
C语言串口通信-源代码
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#include <string.h>
#define COM232 0x2f8
#define COMINT 0x0b
#define MaxBufLen 500
#define Port8259 0x20
#define EofInt 0x20
static int comportaddr;
static char intvectnum;
static unsigned char maskb;
static unsigned char Buffer[MaxBufLen];
static int CharsInBuf,CircIn,CircOut;
static void (interrupt far *OldAsyncInt)();
static void interrupt far AsyncInt(void);
void Init_COM(int ComPortAddr, unsigned char IntVectNum, int Baud,
un
串口调试助手VC++6.0程序
串口调试助手源程序 及编程详细过程
作者:龚建伟 2001.6.20
可以任意转载,但必须注明作者和说明来自http://www.gjwtech.com,不得作为商用
目次:
1.建立项目
2.在项目中插入MSComm控件
3.利用ClassWizard定义CMSComm类控制变量 4.在对话框中添加控件
5.添加串口事件消息处理函数OnComm() 6.打开和设置串口参数 7.发送数据
在众多网友的支持下,串口调试助手从2001年5月21日发布至今,短短一个月,在全国各地累计下载量近5000人次,在近200多个电子邮件中,20多人提供了使用测试意见,更有50多位朋友提出要串口调试助手的源代码,为了答谢谢朋友们的支持,公开推出我最初用VC控件MSComm编写串口通信程序的源代码,并写出详细的编程过程,姑且叫串口调试助手源程序V1.0或VC串口通讯源程序吧,我相信,如果你用VC编程,那么有了这个代码,就可以轻而易举地完成串口编程任务了。(也许本文过于详细,高手就不用看) 开始吧:
1.建立项目:打开VC++6.0,建立一个基于对话框的MFC应用程序SCommTest(与我源代码一致,等会你会方便一点);
2.在项
串口调试助手V1.0 DELPHI SPCOMM V1.1
{***************************************************************** *串口调试助手V1.0 DELPHI SPCOMM V1.1 *作 者:sky
*Email : mastersky@ *QQ : 11116580 *版 本:V1.0 *编写时间:2005/12/19
BitBtn1: TBitBtn; GroupBox1: TGroupBox; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel;
*说 明:本程序完全参照龚建伟VC版《串口调试助手V2.2》编写而成。仅供学习测试之 btnSwitch: TButton; 用。由于改用COMPORT控件为SPCOMM控件,整个代码已经经过大规模的改动,去除了E Panel5: TPanel; mail等与程序应用不太相关的部分,改进了绝大部分算法,添加原未完成的功能 ,程序依然 Button6: TButton; 是参照龚建伟
源代码
篇一:C语言游戏源代码
C语言游戏源代码
1、 简单的开机密码程序
#include "conio.h"
#include "string.h"
#include "stdio.h"
void error()
{window(12,10,68,10);
textbackground(15);
textcolor(132);
clrscr();
cprintf("file or system error! you can't enter the system!!!"); while(1); /*若有错误不能通过程序*/
}
void look()
{FILE *fauto,*fbak;
char *pass="c:\\windows\\password.exe"; /*本程序的位置*/ char a[25],ch;
char *au="autoexec.bat",*bname="hecfback.^^^"; /*bname 是autoexec.bat 的备份*/
setdisk(2); /*set currently disk c:
源代码分析
Pixhawk源码笔记一:APM代码基本结构
Pixhawk源码笔记一:APM代码基本结构
基础知识
详细参考:http://dev.ardupilot.com/wiki/learning-the-ardupilot-codebase/
第一部分:介绍
详细参考:http://dev.ardupilot.com/wiki/learning-ardupilot-introduction/ ArduPilot 代码分为5个主要部分,基本结构分类如下: vehicle directories AP_HAL libraries
tools directories
external support code
1、vehicle directories模型类型 当前共有4种模型:ArduPlane, ArduCopter, APMrover2 and AntennaTracker。都是.pde文件,就是为了兼容arduino平台,以后可能会放弃。
2、AP_HAL硬件抽象层
硬件抽象层,使得在不同硬件平台上的移植变得简单。
其中AP_HAL目录
源代码分析
Pixhawk源码笔记一:APM代码基本结构
Pixhawk源码笔记一:APM代码基本结构
基础知识
详细参考:http://dev.ardupilot.com/wiki/learning-the-ardupilot-codebase/
第一部分:介绍
详细参考:http://dev.ardupilot.com/wiki/learning-ardupilot-introduction/ ArduPilot 代码分为5个主要部分,基本结构分类如下: vehicle directories AP_HAL libraries
tools directories
external support code
1、vehicle directories模型类型 当前共有4种模型:ArduPlane, ArduCopter, APMrover2 and AntennaTracker。都是.pde文件,就是为了兼容arduino平台,以后可能会放弃。
2、AP_HAL硬件抽象层
硬件抽象层,使得在不同硬件平台上的移植变得简单。
其中AP_HAL目录
opcvba源代码
Option Explicit Option Base 1
Const servername = \Dim WithEvents MyOPCServer As OPCServer Dim WithEvents MyOPCGroup As OPCGroup Dim MyOPCGroupColl As OPCGroups Dim MyOPCItemColl As OPCItems Dim MyOPCItems As OPCItems Dim MyOPCItem As OPCItem Dim clienthandles(6) As Long Dim ServerHandles() As Long Dim Values(1) As Variant Dim Errors() As Long Dim ItemIDs(6) As String Dim GroupName As String Dim NodeName As String Dim itemv(6) As Variant Dim ii As Integer
'华丽的分割线—————————————————— 'Sub StartClient()
'目的:链接至OPC_server,创建组和添加条
程序源代码
程 序 源 代 码
第一部分:相对算法代码
(一)提零压缩生成流密文程序
#include"iostream.h"
#include"math.h"
#include"stdlib.h"
#include"time.h"
#include"stdio.h"
#include"fstream.h"
#include"io.h"
char getword(FILE *fp)
{int *s;
int i;
s=&i;
s[0]=getc(fp);
s[1]=getc(fp);
return (i);}//读入一个字
int position(int a,int b)//求数组元素之间相对关系的函数:0表示与本身同性;而1反之
{
if((a&&b)||(!a&&!b))
return 0;
else
return 1;
}
int main()
{ static unsigned char alawbyte[50000];//存放A率压缩后的样值
static int data[50000];
long