I need to recieve and send serial data typically a string like this -
"S3À-²±0.²00ª-±5" So you see this contains standard characters
(ascii 0-127) and Extended characters(ascii 128-255).
With my main program I am struggling to receive the characters
correctly even with NO parity and 8 data bits.
I can send them back out ok from a file transferred thru activesync
to the device but receiving them them via RS232 is proving a problem.
I have not used 'StringtoByteArray' or reverse in any of my coding
yet but I suspect I need this, but I really dont understand how a
byte array is contructed so I put this test code together which just
receives on com1 and displays to a text box.
I'm really struggling to get the received data into a format that I
can save to file.
Has anybody done this before? I searched the form without anything
I'll post the result if I can get this into a little demo file to
Sorry about the long post.....Thanks Anybody
'setup port here
objport.noevents = True
ObjPort.ComPort = 1
objport.Baudrate = 4800
objport.bytesize = 8 '8 databits
ObjPort.Parity = 0 'Parity None
ObjPort.StopBits = 0 '1stop bit
ObjPort.Handshake = 0 ' no handshake
'objport.buffersize = 1
'open the port
objport.enabled = True
newinputdata = objport.read(1,0)
textbox1.Text = textbox1.Text & newinputdata
'REALLY GOT LOST IN THIS BIT
'mybyte = objport.stringtobytearray(newinputdata)
'textbox1.Text = textbox1.Text & Asc(mybyte(0))
'mystr = objport.bytearraytostring(mybyte)
'textbox1.Text= textbox1.Text & mystr