rc校验码。Р Timer1.Enabled = FalseР strout = ":" + str + + Chr$(13) + Chr$(10) '欲传送之数据。13为D,10为AР m1.InBufferCount = 0Р m1.Output = stroutР Timer1.Enabled = TrueР End IfРEnd SubРPrivate Sub YO_Click()Р Dim strout As StringР If y0flag = 0 ThenР str = "FF00"Р = LRC(str) '计算 str的lrc校验码。Р Timer1.Enabled = FalseР strout = ":" + str + + Chr$(13) + Chr$(10) '欲传送之数据。13为D,10为AР m1.InBufferCount = 0Р m1.Output = stroutР Timer1.Enabled = TrueР ElseР str = "0"Р = LRC(str) '计算 str的lrc校验码。Р Timer1.Enabled = FalseР strout = ":" + str + + Chr$(13) + Chr$(10) '欲传送之数据。13为D,10为AР m1.InBufferCount = 0Р m1.Output = stroutР Timer1.Enabled = TrueР End IfРEnd Sub