serial port - TechRepublic
General discussion
May 7, 2007 at 06:39 AM
jatinder_44

serial port

by jatinder_44 . Updated 19 years, 2 months ago

it convert the value to hexadecimal but when i pass this value to the mscomm control or to the serial port it doesn’t reply my code is just follow below.
[code=vb]
Text3.Text = Hex(Text1.Text)
bytetosend(0) = Text3.Text
bytetosend(1) = Text3.Text
bytetosend(2) = Text3.Text
bytetosend(3) = Text3.Text
bytetosend(4) = Text3.Text
bytetosend(5) = Text3.Text
buffer = bytetosend()
MSComm1.Output = buffer
Do
dummy = DoEvents()
Loop Until MSComm1.InBufferCount > 5
datain = MSComm1.Input
Text2.Text = Val(Asc(Mid$(datain, 1, 1)))

[/code]
And i want to display the value in Text2.text from input from serial port.pls help in this .
Thank u

This discussion is locked

All Comments