通过串行端口VB发送和接收十六进制值

时间:2014-09-01 12:39:57

标签: vb.net hex

在VB中,我能够使用writeline()和readline()方法发送和接收带有串行端口的字符串 但是,如何通过串口发送和接收直接十六进制值?

1 个答案:

答案 0 :(得分:0)

Dim v As Byte
Open "COM1" For Binary As #1
v = <The value to write>
Put #1, , v
Close #1