VB和单片机通讯时怎么设置timer的属性

来源:百度知道 编辑:UC知道 时间:2024/05/08 19:51:25

什么意思?通信用timer做什么用途?
是mscomm吧!

'------------------------------------------------------------------------------
Private Sub Timer1_Timer() ' Timer的设定
buffer$ = buffer$ + MSComm1.Input ' 抓取MSComm的输入资料(接收)
Text1 = Text1 + buffer$ ' 将资料显示在讯息视窗上
buffer$ = "" ' 清空字串暂存
If Len(Text1) > 1024 Then ' 如果接收资料超过1K Bytes
Text1 = "" ' 就清空讯息视窗
End If
End Sub