I am pretty new to c++ programming. I am looking over some older source code that uses a counter routine to delay the process while it reads from a serial port. The problem is that this was written when 133mhz was fast but now it is to fast and reaches the max time before it is able to receive information back from the module we are scanning. I have documentation stating the time needed to receive a reading back using different baud rates. I could up the time to a long value, but the same problem would pop up again in another year. So my question is how can I do a time delay of 30ms. I would like it to scan the serial port in a while loop, if it gets the reading in it would change a value to one and kick out of the loop after it sees a 0x0d. I would also like the && to show a time delay of 30ms, if it reaches this time and has not scanned anything in then kick out of the loop. I would deeply appreciate any help I could get on this matter. I feel a time delay would be much more beneficial than a counter even though I have it set in an ini form for change.
Thank you!
jscorpion
Thank you!
jscorpion