谁有DELPHI串口编程方面的电子书(或链接)(100分)

M

madaha

Unregistered / Unconfirmed
GUEST, unregistred user!
谁有DELPHI串口编程方面的电子书(或链接),谢谢!!!
 
http://203soft.vicp.net/<br>
 
Q00001635<br><br>提出问题: 怎样对串口读写数据 (100分)<br><br>答案提供者: 赵建东<br><br>来自: Lamb &nbsp;时间:98-10-26 17:42:17 ID: 1635<br>&nbsp;<br><br>我需要编写一个程序对串口读写数据,谁能告诉我方法?如果能有源代码的例子,就太好了。希望有人能帮助我!!!<br><br>&nbsp;<br><br>来自: lyz &nbsp;时间:98-9-10 9:59:06 ID: 1640<br>&nbsp;<br><br>给我你的email地址,我传给你一份程序,一份标准控件的源程序.<br><br>&nbsp;<br><br>来自: lyz &nbsp;时间:98-9-10 10:01:00 ID: 1641<br>&nbsp;<br><br>忘了告诉你我的地址:lyz531@163.net<br><br>&nbsp;<br><br>来自: yysun &nbsp;时间:98-9-10 10:34:01 ID: 1643<br>&nbsp;<br><br>请下载lyz的&lt;a href="/delphi/attachments/comm.zip"&gt;答案&lt;/a&gt;。<br><br>&nbsp;<br><br>来自: qianjh &nbsp;时间:98-9-25 17:42:56 ID: 13517<br>&nbsp;<br><br>我这里有一个component,是从super page下的,有源代码。如需要可发个e-mail给我:qianjh@263.net.<br><br>&nbsp;<br><br>来自: 曹晓钢 &nbsp;时间:98-9-25 19:27:03 ID: 13521<br>&nbsp;<br><br>TCommPortDriver ,很不错的。<br><br>支持16个串口. 如果你要用到COM3,COM4(比如在两台机器间传数据),用他就对了。很好用,支持Packet, 如果传输得是定长的数据,尤其适用.传到了一定的长度,会有事件触发的。<br><br>经过实践环境检验,稳定,可靠.以运行好几个月,一点问题没有。<br><br>附带CommTest,一个很好的检测工具,可以试验发送数据.支持各种握手方法,不过我都没用过。下载自DSP,Delphi深度历险中好象也有。<br><br>来自: Lamb &nbsp;时间:98-9-26 12:29:13 ID: 13563<br>&nbsp;<br><br>我目前下载了async32控件,效果还可以。<br><br>&nbsp;<br><br>来自: wangts &nbsp;时间:98-9-29 9:52:52 ID: 23981<br>&nbsp;<br><br>232串口驱动控件及测试程序,从http://mdlive.com/d3k/下载的,不知道现在还有没有,如需要可e-mail通知我,wts999@263.net<br><br>&nbsp;<br><br>来自: liuj &nbsp;时间:98-9-29 10:55:02 ID: 23991<br>&nbsp;<br><br>VB中的MS COMM控件很好用,为何不用,VB的ON LINE BOOK中有例程,有问题:liuj@990.net<br><br>&nbsp;<br><br>来自: dwwang &nbsp;时间:98-9-29 13:44:04 ID: 24009<br>&nbsp;<br><br>用 sp_comm,这是我所知道的最小巧而又功能强大的控件,我们长期进行串口通讯开发,最终确认这是最好的控件。<br><br>不但有控间的源码,http://www.nease.net/~bozhi/上还有使用的例子。<br><br>来自: Lamb &nbsp;时间:98-10-3 10:41:48 ID: 29422<br>&nbsp;<br><br>目前,我已能从串口收发数据,但是:谁能告诉我,怎样按位传送数据.或者按比特传送后,判断每一位数据是什么?<br><br>&nbsp;<br><br>来自: 赵建东 &nbsp;时间:98-10-4 0:38:56 ID: 29432<br>&nbsp;<br><br>三个串行口控件的"小"比较:<br><br>1:VB的MSCOMM控件<br><br>&nbsp; &nbsp; &nbsp; &nbsp;各种属性,串行口的通讯细节设置方便,但只有一个事件,编程繁琐,需要自己用"Case"来区分各种事件,并由于是非多线程控件,而串行口的发送速度相对主机较慢,故在程序里要注意释放CPU资源。<br><br>2: Comm32.zip <br><br>&nbsp; &nbsp; &nbsp; &nbsp;最新的源代码,Ver 1.08,据说可以支持到 16个串行口,在Delhi4下也不能正常安装,故没有用,只记得过去在Delphi2编译正常,各种设置多可通过下拉框选择。<br><br>3: Spcomm控件:<br><br>&nbsp; &nbsp; &nbsp; &nbsp;细节设置不方便,端口,速度要手工键入,但是,事件多,且是一个多线程控件。<br><br>故编程很方便.简单,本人推荐.已成功使用COM1,COM2,COM3。<br><br>&nbsp; &nbsp; &nbsp; &nbsp;如何初始化Com口?设置好 "端口,速度,停止"后, "Comm1.startcomm;"便可 &nbsp; &nbsp; <br><br>&nbsp; &nbsp; &nbsp; &nbsp;如何向串口发送位? 设置好要发送的缓冲指针,发送长度,如下<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if comm1.WriteCommData(Pchar(strTxCode),CodeLength)<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then begin<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wait232Rime:=0; // 发送成功后,开启定时器, 此时间为串行口未响应最长时间<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Timer1.Enabled:=True;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; statusLine.Panels.Items[0].Text:='通讯端口命令发送成功';<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else begin<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FaSongStatus:=False;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; statusLine.Panels.Items[0].Text:='通讯端口联络命令发送不成功 !';<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br><br>&nbsp;<br><br>&nbsp; &nbsp;如何响应Com口的位到达,有接收事件<br><br>procedure TfrmRs232Main.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;<br><br>&nbsp; BufferLength: Word);<br><br>var<br><br>&nbsp; strRxIn:string;<br><br>&nbsp; charCode:char;<br><br>&nbsp; intPos:integer;<br><br>&nbsp; intCheck:integer; &nbsp; // &nbsp;检验和计数<br><br>&nbsp; CheckTemp:integer;<br><br>begin<br><br>&nbsp; SetLength(strRxIn,BufferLength); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // 设置接收字符串长度<br><br>&nbsp; Move(Buffer^, PChar(strRxIn)^, BufferLength); &nbsp;// RS232数据==&gt;strRxIn &nbsp; <br><br>&nbsp; 或者按比特传送后,判断每一位数据是什么? &nbsp; &nbsp;用Pascal的逻辑指令分离吧 &nbsp; &nbsp; &nbsp; &nbsp;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...<br><br>注意: 1: &nbsp;0值处理 &nbsp; 为结束符号处理? 不处理<br><br>&nbsp; &nbsp; &nbsp;2: &nbsp;硬件连接, 25针同9针 管脚的不同,如果用三线连接,要用软件来达到握手信号<br><br>&nbsp; &nbsp; &nbsp;3: &nbsp;发送流要加同步字符<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br><br>来自: delphi &nbsp;时间:98-10-4 6:19:41 ID: 29437<br>&nbsp;<br><br>还是Turbo Power的巨无霸Async Pro好用。 :) &nbsp;支持多用户卡... 功能很多,到Turbo Power瞧去...<br><br>&nbsp;<br><br>来自: Lamb &nbsp;时间:98-10-5 14:07:26 ID: 35569<br>&nbsp;<br><br>RS232和RS422的转换需要注意什么?<br><br>&nbsp;<br><br>来自: jl &nbsp;时间:98-10-11 12:01:13 ID: 58811<br>&nbsp;<br><br>Spcomm控件可以在Delphi4中使用吗?和Async32比哪个更好,更稳定?谢谢!<br><br>&nbsp;<br><br>来自: dzm5773 &nbsp;时间:98-10-11 12:05:56 ID: 58812<br>&nbsp;<br><br>在delphi 3中那个好???<br><br>&nbsp;<br><br>来自: dwwang &nbsp;时间:98-10-11 12:31:25 ID: 58816<br>&nbsp;<br><br>在 Delphi3中 spcomm和commdrv32都差不多,但注意:commdrv32一定要用最新版,下载地见我另一篇贴子。<br><br>Delphi4中commdrv32有不兼容的代码,主要是类型转换更严格导致,但你可以给Commdrv32的作者发信,索取Delphi4版。e-mail:d3k@mdnet.itd<br><br>spcomm Delphi4我还没试过。<br><br>spcomm和ASync32严格说不属于同一种类,前者简单灵活,足以胜任串口通讯任务;后者是一个庞大的控件组,支持各种协议。<br><br>&nbsp;<br>
 
我想找的是较详细的书!!!
 
三种方法<br>1、API读写文件方法操作COM1、COM2口等<br>2、使用SPCOMM、MSCOMM等第三方工具<br>3、编制自己的DLL或控件<br>
 
我想找的是较详细的电子书!!!<br>谢谢哪位DFW提供,或写出链接。<br><br>madahaa@21cn.com
 
多人接受答案了。
 
顶部