??? 03/22/07 08:19 Read: times |
#135562 - serial ports and visual c#? |
I realize that this is a firmware site, but given the number of people on here who seem to be software developers, I thought I'd toss out a question...
Some background: I haven't written any robust PC side code for about 5 years. When I did it was mostly application level Java/C++. I just got a copy of MS Visual Studio 2005. I'm trying to learn Visual C# on the fly. The goal: I want to make a utility to program some parameters into my 8051 via UART/RS232. The utility is a gui that you can select a bunch of options and based on those options (when you press the magic button) a serial stream will leave the PC's com port and go into my 8051 where the firmware handles the rest. My firmware works (confirmed by "manually" doing what the utility will via a terminal). The utility is far from complete. I've created a form with various objects in it (just by drag and drop) including a buttons, check boxes, and a serial port. I've successfully opened the port and been able to write data to the port and receive it correctly with my 8051. Very easy actually, I was impressed with MS after my first 20 mins of .net programming. The question: how do I receive data asynchronously? I want the utility to "interrupt" when it receives data and store that data in, let’s say a string. serialport.read() (as I understand it) requires you to know that there is something to be read. I see there exists serialport.DataReceived, but I'm not sure what to do with this... Any thoughts? Know of any good resources? Google points me to a bunch of stuff predating the "drag and drop" days of programming :) Thanks a lot, D |
Topic | Author | Date |
serial ports and visual c#? | 01/01/70 00:00 | |
update | 01/01/70 00:00 | |
I once did something like that ... | 01/01/70 00:00 | |
VB2005 and the Serial Port | 01/01/70 00:00 | |
This may help | 01/01/70 00:00 | |
Thanks guys | 01/01/70 00:00 |