0

i am connecting mirochip to serial com232

i am sending
from the pc to micro controler
then the micro controller
send back that he recieve
so the pc send the next word

how to wait the incoming serial data
and how to define the timeout(for example 10 second)

thanks at all

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Fire_Michel
0

Post the code you have so far. Its more or less like using a socket with buffered read/writes. See SerialPort.ReadTimeout and SerialPort.WriteTimeout for setting the timeout values.

-1

for timeout u can start a timer with the interval u want
if it enters @ timer1_tick then stop the timer and print a time out msg

u can use also DataRecieved Event to recieve data by calling
the ReadExisting() function
then u can send the next word

i hope it is the answer u r searching for
good luck

Votes + Comments
Take the extra time to spell out words completely
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.