发表于:2005/9/12 19:35:00
#0楼
[size=2]如题,现在已将计数器产生的TH与TL信息传送到上微机并且16进制显示正常(使用串口调试软件),请问如果我想让其用十进制将信息显示出来应当如何进行转换?
Private Sub Comm1_OnComm()
Select Case Comm1.CommEvent
Case comEvCD ' CD 线的状态发生变化.
Case comEvCTS ' CTS 线的状态发生变化.
Case comEvDSR ' DSR 线的状态发生变化.
Case comEvRing ' Ring Indicator 变化.
Case comEvReceive ' 收到 RThreshold # of
Txtreceive.Text = Txtreceive.Text +Comm1.Input
Case comEvSend ' 传输缓冲区有 Sthreshold 个字符
End Select
End Sub[/size]
Private Sub Comm1_OnComm()
Select Case Comm1.CommEvent
Case comEvCD ' CD 线的状态发生变化.
Case comEvCTS ' CTS 线的状态发生变化.
Case comEvDSR ' DSR 线的状态发生变化.
Case comEvRing ' Ring Indicator 变化.
Case comEvReceive ' 收到 RThreshold # of
Txtreceive.Text = Txtreceive.Text +Comm1.Input
Case comEvSend ' 传输缓冲区有 Sthreshold 个字符
End Select
End Sub[/size]