G
gene.james
One of those cases where the problem is probably right under my nose
but I can't see it. This serial test code fails to send the right data:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ButtonCAM1.Click
Dim TestData() As Byte = {&HFE, &H11, &H11, &HFF}
Using KeyerCom As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort(KeyerPortName, 38400,
IO.Ports.Parity.None, 8, IO.Ports.StopBits.One)
KeyerCom.DtrEnable = True
KeyerCom.Write(TestData, 0, 4)
End Using
End Sub
Checking with a serial monitor, I find that it actually sends code
sends a NUL (&H00) after every byte sent. So the stream actually sent
(as hex)is: FE 00 11 00 11 00 FF 00
Any ideas?
but I can't see it. This serial test code fails to send the right data:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ButtonCAM1.Click
Dim TestData() As Byte = {&HFE, &H11, &H11, &HFF}
Using KeyerCom As IO.Ports.SerialPort = _
My.Computer.Ports.OpenSerialPort(KeyerPortName, 38400,
IO.Ports.Parity.None, 8, IO.Ports.StopBits.One)
KeyerCom.DtrEnable = True
KeyerCom.Write(TestData, 0, 4)
End Using
End Sub
Checking with a serial monitor, I find that it actually sends code
sends a NUL (&H00) after every byte sent. So the stream actually sent
(as hex)is: FE 00 11 00 11 00 FF 00
Any ideas?