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?