首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动应用 >

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

2012-01-24 
tc35i通信格式(VB编程)我用VB编TC35i的串口通信程序,初始设定是comm1.commport1comm1.DTrenabletruecomm

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" 
應該不是這樣寫的吧,這個是字符串,不是真的回車

热点排行