-
Reading Serial port in VB.NET
Hello everyone. I just registered here, and wanted to greet everyone first of all.
I'm an electronics engineer and am fairly good with programming, but mostly in C and ASM for programming microcontrollers. Unfortunately my experience is biting me back as I have to write a front-end for one of my circuits this time.
The circuit transmits 2-byte unsigned integer, plus 0x0A0D every 50 miliseconds or so. It transmits the data over RS-232 protocol, that my computer sees as a COM port. If I read it with hyper-terminal, the data comes in perfect.
In the front-end I want to output (as text) the time stamp of when this or that value arrived, and the value itself. So if my circuit transmits 0x01230A0D I want to output to a text box "[1:23:45:678] 291" The trouble is, SerialPort.Read() buffers everything so I have no idea when this or that value came in. So, is there a way to cancel buffers? Or to read everything byte-by-byte as the data comes in? Or to have some sort of an interrupt or event when 4 bytes of the type 0xNNNN0A0D are read?
Similar Threads
-
Replies: 8
Last Post: 04-09-2007, 10:40 AM
-
By speedss in forum VB Classic
Replies: 4
Last Post: 01-26-2007, 12:14 AM
-
Replies: 1
Last Post: 02-21-2006, 01:23 AM
-
By PWilmarth in forum .NET
Replies: 3
Last Post: 09-07-2002, 04:04 AM
-
By Ettienne in forum .NET
Replies: 2
Last Post: 10-22-2001, 01:12 PM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks