专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 移动应用

tc35i通信格式(VB编程),该如何处理

发布时间:2010-05-30 21:30:43 文章来源:www.iduyao.cn 采编人员:星星草
tc35i通信格式(VB编程)
我用VB编TC35i的串口通信程序,初始设定是
comm1.commport=1
comm1.DTrenable=true
comm1.handshaking=comNone
comm1.inbuffersize=1024
comm1.inputlen=0
comm1.inputmode=cominputmodetext
comm1.nulldiscard=false
comm1.outbuffersize=0
comm1.trhershold=1
comm1.RTSEnable=false
comm1.steeings=9600,n,8,1
comm1.sthreshold=0
我用txtsend文本框的keypress事件输入AT命令
Private Sub txtsend_KeyPress(KeyAscii As Integer)
   
   
  If KeyAscii = 13 Then
  n = Len(txtsend.Text)
  For i = 1 To n
  Comm1.Output = Hex(Asc(Mid(txtsend.Text, i, 1)))  
  Next i
  Comm1.Output = "0D"
  End If

End Sub
当我自发自收at<cr>的时候,在接受区得到的是61740d。用串口调试助手16位输出61740d,tc35i会回复ok,但从我的vb程序输出tc35i就没有反应,大家帮忙看看是为什么呢
谢谢大家了






------解决方案--------------------

 Comm1.Output = "0D" 
應該不是這樣寫的吧,這個是字符串,不是真的回車
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: