Hi, > You can only use the start bit for bit duration timing if the next bit has > the opposite sense. Only the start and stop bits have guaranteed polarity. > It is possible to watch the bits going by and eventually deduce the bit > timing, but not trivial. If you have a rough idea of the baud rate so that > the start and stop bits can be identified, then it becomes easier. Yes, you are right but in many application you can block the data and use a know value sync byte. I looked over the application where I used this and it was in an radio where I had the preamble and always had a known byte to sync the receiver starting. What I did afterwards was to use a "software pll" to keep the timing following the timing of the receiving stream. I looked at all the edges of the receiving stream and used their times to adjust the counter for the center of the bit position if they where within certain limits. Easier to do than to explain :-) The code is not very complicated at all. If the cost is a main concern it can work quite well this way with the internal oscilattor alone. The baud rate can't be too high also or the timing counter will be so small that you loose the needed headroom. Best regards, Alexandre Guimaraes -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body