On Sat, 25 Nov 1995, Mauricio Culibrk wrote: > Hi everybody, > > In one of my applications, I need a serial RX/TX routine capable to > 'recognize' the speed of the serial line, so it can adjust itself to > that speed (eg. I have a '84 based 'host' to which I want to attach > few 'terminals' working at 1200, 2400, 4800, 9600 baud). > Did anybody try something similar? > Any ideas on how to determine the RX speed, possibly without loosing > a byte of data? > > Thanx, > > Max > I haven't tried it myself but a lot of people have done that already. However, I'm not sure what do you mean by "..without loosing a byte of data?". Usually, you connect to something (host) that is already sending data, for synchronization with whoever wants to connect. The data usually is such that you could actually try all possible baud rates (brute force, but you could think of other techniques) and then when the expected data is finally received, you inform the host that you are know synchoronized with his baud rate. So in that case, you do lose some bytes of data but its OK. Those data are for, as I said, to,let you synchronize with the host. To summarize, in order to connect to a host at his baud rate, the host must send a "synchronization" data. Of course you must know the data. You then adjust your baud rate until you receive the correct data. When you finally is in "harmony" with your host, inform him, and the rest of the communication then proceeds. Hope I was of help. Good luck!