?? 串口調試助手源程序2.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://www.gjwtech.com/vcandc/scommassistantcode02.htm -->
<HTML><HEAD><TITLE>串口調試助手源程序</TITLE>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<META content=www.gjwtech.com,龔建偉技術主頁,龔建偉,串口調試助手,VC/C編程,移動機器人,matlab仿真
name=keywords>
<META content=串口、端口、網絡通信技術,VC、C編程技術,輪式移動機器人控制相關技術,Matlab仿真及數據處理
name=DESCRIPTION>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>A:link {
COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
COLOR: #000000; TEXT-DECORATION: none
}
A:active {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #000000; TEXT-DECORATION: underline
}
BODY {
FONT-SIZE: 9pt; COLOR: #000000; FONT-FAMILY: 宋體
}
TABLE {
FONT-SIZE: 9pt; FONT-FAMILY: 宋體
}
.H1 {
FONT-SIZE: 9pt; LINE-HEIGHT: 9pt; align: center
}
TD {
FONT-SIZE: 9pt; FONT-FAMILY: "宋體", "Arial", "Times New Roman"
}
P {
FONT-SIZE: 9pt; FONT-FAMILY: "宋體", "Arial", "Times New Roman"
}
</STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<FORM name=form1 action="" method=post>
<TABLE cellSpacing=1 cellPadding=0 width=770 align=center bgColor=#000000
border=0>
<TBODY>
<TR>
<TD bgColor=#ffffff>
<TABLE cellSpacing=1 cellPadding=0 width=770 align=center bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD bgColor=#0059a5 colSpan=2>
<TABLE cellSpacing=0 cellPadding=0 width="83%" border=0>
<TBODY>
<TR>
<TD width="97%"><IMG height=26 src="串口調試助手源程序2.files/logo.gif"
width=381> <FONT
color=#ffffff>
<SCRIPT language=JavaScript1.2><!-- Beginvar months=new Array(13);months[1]="January";months[2]="February";months[3]="March";months[4]="April";months[5]="May";months[6]="June";months[7]="July";months[8]="August";months[9]="September";months[10]="October";months[11]="November";months[12]="December";var time=new Date();var lmonth=months[time.getMonth() + 1];var date=time.getDate();var year=time.getYear();if (year < 2000) // Y2K Fix, Isaac Powellyear = year + 1900; // http://onyx.idbsu.edu/~ipowelldocument.write("<right>" + lmonth + " ");document.write(date + ", " + year + "</right>");// End --></SCRIPT>
</FONT></TD></TR></TBODY></TABLE></TD></TR>
<TR bgColor=#ffffff>
<TD colSpan=2 height=67>
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background=串口調試助手源程序2.files/orange_bg.gif border=0>
<TBODY>
<TR align=middle>
<TD width="21%"><IMG height=50
src="串口調試助手源程序2.files/gjwtechlogo.jpg" width=128 border=0></TD>
<TD align=left width="79%"><EMBED src=../ads/banner0.swf
width=539 height=67
type=application/x-shockwave-flash></TD></TR></TBODY></TABLE></TD></TR>
<TR align=middle bgColor=#018cd2>
<TD colSpan=2><A
href="http://www.gjwtech.com/index.htm">首頁</A> <A
href="http://www.gjwtech.com/resume.htm" target=_blank>個人簡歷</A><FONT
color=#ffffff size=2> </FONT><A
href="http://www.gjwtech.com/article.htm"
target=_blank>發表論文</A><FONT color=#ffffff> <A
href="http://www.gjwtech.com/scommbook/serialprogbook.htm"
target="_blank">個人書稿</A> </FONT><A
href="http://www.gjwtech.com/serialcomm.htm">串</A><A
href="http://www.gjwtech.com/serialcomm.htm"
target=_blank>行通訊</A><FONT color=#ffffff> </FONT><A
href="http://www.gjwtech.com/vcandindex.htm"
target=_blank>VC/C編程</A><FONT color=#ffffff> <A
href="http://www.gjwtech.com/vcandc/scommassistantcode02.htm#">機器人控制</A> </FONT><A
href="http://www.gjwtech.com/matlabindex.htm"
target=_blank>MATLAB</A></TD></TR>
<TR>
<TD vAlign=top width=86 rowSpan=5>
<TABLE id=table3 cellSpacing=0 cellPadding=2 width="98%" border=0>
<TBODY>
<TR>
<TD colSpan=2><IMG height=1 src="串口調試助手源程序2.files/spacer.gif"
width=1></TD></TR>
<TR>
<TD width="100%" colSpan=2><IMG height=8
src="串口調試助手源程序2.files/dotted_lines.gif" width=605
border=0></TD></TR>
<TR>
<TD width="3%"> </TD>
<TD class=text width=680>
<P align=center><EMBED src=../ads/midad02.swf width=431
height=110 type=application/x-shockwave-flash></P></TD></TR>
<TR>
<TD colSpan=2><IMG height=1 src="串口調試助手源程序2.files/spacer.gif"
width=1></TD></TR></TBODY></TABLE>
<TABLE id=table4 cellSpacing=0 cellPadding=0 width=605 border=0>
<TBODY>
<TR>
<TD colSpan=2><IMG height=8
src="串口調試助手源程序2.files/dotted_lines.gif" width=605></TD></TR>
<TR align=middle>
<TD align=middle width=605 colSpan=2> </TD></TR>
<TR>
<TD width=680 colSpan=2><IMG height=8
src="串口調試助手源程序2.files/dotted_lines.gif" width=605></TD></TR>
<TR>
<TD vAlign=top colSpan=2><IMG height=1
src="串口調試助手源程序2.files/spacer.gif" width=1></TD></TR>
<TR>
<TD vAlign=top align=middle colSpan=2>
<H1 align=center><A name=串口調試助手源程序>串口調試助手源程序</A></H1>
<H1 align=center>及編程詳細過程(二)</H1>
<P align=center><IMG height=104
src="串口調試助手源程序2.files/mousehitbear.gif" width=140 align=left
border=0>作者:<A style="COLOR: #006666; TEXT-DECORATION: none"
href="mailto:xiaofengstudio@sina.com">龔建偉</A>
2001.8.25</P>
<P align=center>可以任意轉載,但必須注明作者和說明來自<A
style="COLOR: #006666; TEXT-DECORATION: none"
href="http://roaringwind.best.163.com/">http://roaringwind.best.163.com/</A>,不得作為商用</P></TD></TR>
<TR>
<TD vAlign=top align=middle colSpan=2>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px"> </P></TD></TR>
<TR>
<TD vAlign=top align=middle colSpan=2><IMG height=8
src="串口調試助手源程序2.files/dotted_lines.gif" width=605></TD></TR>
<TR>
<TD vAlign=top align=middle width=446> </TD>
<TD vAlign=top align=middle width=159> </TD></TR>
<TR>
<TD vAlign=top align=middle width=446> </TD>
<TD vAlign=top align=middle width=159> </TD></TR>
<TR>
<TD vAlign=top align=middle colSpan=2>
<P align=center>目次:</P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT
color=#c0c0c0>1.建立項目 </FONT></B></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT
color=#c0c0c0>2.在項目中插入MSComm控件</FONT></B><FONT
color=#c0c0c0><A style="COLOR: #006666; TEXT-DECORATION: none"
href="http://www.gjwtech.com/vcandc/scommassistantcode02.htm#2.在項目中插入MSComm控件"> </A></FONT></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT
color=#c0c0c0>3.利用ClassWizard定義CMSComm類控制變量</FONT></B></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT
color=#c0c0c0>4.在對話框中添加控件 </FONT></B></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT
color=#c0c0c0>5.添加串口事件消息處理函數OnComm()</FONT></B></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT color=#c0c0c0>6.打開和設置串口參數</FONT></B></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B><FONT color=#c0c0c0>7.發送數據</FONT></B></P>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px" align=left><A
style="COLOR: #006666; TEXT-DECORATION: none"
href="http://www.gjwtech.com/vcandc/scommassistantcode02.htm#8.發送十六進制字符">8.發送十六進制字符</A></P>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px" align=left><A
style="COLOR: #006666; TEXT-DECORATION: none"
href="http://www.gjwtech.com/vcandc/scommassistantcode02.htm#9.在接收框中以十六進制顯示">9.在接收框中以十六進制顯示</A></P>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px" align=left><A
style="COLOR: #006666; TEXT-DECORATION: none"
href="http://www.gjwtech.com/vcandc/scommassistantcode02.htm#10.如何設置自動發送">10.如何設置自動發送</A></P>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px" align=left><A
style="COLOR: #006666; TEXT-DECORATION: none"
href="http://www.gjwtech.com/vcandc/scommassistantcode02.htm#11.什么是VARIANT數據類型?如何使用VARIANT數據類型?">11.什么是VARIANT數據類型?如何使用VARIANT數據類型?</A></P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left> </P>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 5px"
align=left><B> </B></P>
<P align=left> 這是<A
style="COLOR: #006666; TEXT-DECORATION: none"
href="http://www.gjwtech.com/vcandc/scommassistantcode.htm">串口調試助手源程序及編程詳細過程</A>(一)的續篇,首先謝謝朋友們的支持與鼓勵。</P>
<P align=left><B> </B></P>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px"
align=left><FONT color=#999999><IMG height=65
src="串口調試助手源程序2.files/jumpsmile1.gif" width=56
border=0></FONT><A name=8.發送十六進制字符><B>8.發送十六進制字符</B></A></P>
<P style="MARGIN-TOP: 3px; MARGIN-BOTTOM: 3px"
align=left>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -