Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi;
My program is receiving data from hardware(By means of Serial Port).I wanna get it Byte by Byte.
How can I detect when datas come from IO ports? I wanted to use "Hardware Interrupts" but I couldnt do it. Would you please help me how to do it?
Posted

The System.IO.Ports.SerialPort[^] class provides a DataReceived event. It fires when data is received, as the name implies.

Subscribing a method to this event, you can then process the data byte-by-byte.

For an article on using the SerialPort, start here[^].
 
Share this answer
 
v2
Sorry,I didnt understand what you said.Could you please describe more?
 
Share this answer
 
Comments
lukeer 5-Sep-12 4:48am    
1) Don't post commentary or questions as solutions.
Instead, write a comment to the solution you're not satisfied with.
2) I've updated my solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900