- #1
ionlylooklazy
- 30
- 0
Hello all,
I am trying to communicate with a rs232 device using VB.
however, testing my program by using hypterminal, I noticed that any time I try to output an ascii character 128 or higher, it shows up as a '?' instead of the desired character.
I know hypterminal is able to display the character (its a u with a hat), but is the data getting lost somehow? are the correct bits being transmitted, or am I not setting up my communications correctly?
Heres my code (btw, is there an easier way to send ascii character? (either in hex,dec, or bin):
ps. What is stick parity? I'm not familiar with this. The protocoling I'm using utilizes it by have the parity on the first byte set to 1, and the rest of the bytes in a packet set to 0. To mimick this, I've been using Mark and Space parity respectively, but am unsure whether or not this is the same. (i have been using no parity for tests with hyperterminal)
Thanks,
IOLL
I am trying to communicate with a rs232 device using VB.
however, testing my program by using hypterminal, I noticed that any time I try to output an ascii character 128 or higher, it shows up as a '?' instead of the desired character.
I know hypterminal is able to display the character (its a u with a hat), but is the data getting lost somehow? are the correct bits being transmitted, or am I not setting up my communications correctly?
Heres my code (btw, is there an easier way to send ascii character? (either in hex,dec, or bin):
Code:
Dim ascii As Encoding = Encoding.ASCII
Dim test As Byte()
Dim test1 As String
test1 = Chr(8) + Chr(9) + chr(8) + Chr(17) + Chr(150) ' ect.. all bytes for a certain packet
test = ascii.GetBytes(test1)
value.Write(test, 0, 10)
ps. What is stick parity? I'm not familiar with this. The protocoling I'm using utilizes it by have the parity on the first byte set to 1, and the rest of the bytes in a packet set to 0. To mimick this, I've been using Mark and Space parity respectively, but am unsure whether or not this is the same. (i have been using no parity for tests with hyperterminal)
Thanks,
IOLL