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

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.

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

commented: Take the extra time to spell out words completely -1