|
-
Jul 28th, 2011, 08:22 PM
#1
Thread Starter
Member
RESOLVED: Tutorials for Serial ports / threading???
I'm looking for any tutorials on serial ports. I'm working on a project to read a serial port, and this is my current method:
Code:
SerialPort1.Close()
SerialPort1.BaudRate = 9600
SerialPort1.Parity = IO.Ports.Parity.None
SerialPort1.DataBits = 8
SerialPort1.StopBits = IO.Ports.StopBits.One
SerialPort1.Open()
SerialPort1.ReadExisting()
Dim input As String = _SerialPort1.ReadExisting
TextBox1.Text = input
TextBox1.Refresh()
I get no build errors or other errors, but on running it, I get no text in textbox1.
I do have a serial port control on form1.
To test, I have connected two computers and sent serial data from hyperterminal to hyperterminal successfully. This also confirms that baud/parity/stop/data are set correctly.
Clearly, there's something missing, but the books I have don't talk about serial, so I'm hoping that there is a tutorial out there somewhere than makes it clear as mud.
I'd also love to see a tutorial on threading in VB.net, if anyone has one lying around.
Thanks in advance.
Last edited by Og_ofthejungle; Aug 1st, 2011 at 12:59 PM.
Reason: To Resolve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|