Paul Gaastra wrote: > I thought the allowable % error for the baud rate was worked out > from how far out the clock can be out after all the bits have been > clocked in. Can anyone point to a document on the web that explains > this? Paul: It's easy to explain. A UART transmits 10 bits for every byte of data that it sends: There's a start bit, eight bits of data, then a stop bit. The UART synchronizes on the leading edge of the "start" bit, then it expects each of the remaining nine bits to appear at specific times. For a byte to be received correctly, more than 50% of each bit must appear at the time that the UART expects it. In other words, each bit can be offset by -- at most -- one half of one bit-time. If there's a timing error, the error gets progressively larger for each bit after the "start" bit, so the tenth bit (the "stop" bit) is offset the most. Since the UART requires the stop bit to be within one-half of one bit-time from its expected location, the maximum allowed error is one half of one bit time, divided by ten bits... Or 5%. > Second question: On page 9-98 of the 1996/1997 PIC 16/17 > Microcontroller data book in table 12-4 they give a table of > various crystals and the % error for baud rate using the USART. > None of the crystals give exact baud rates. .... Why does the book > have those crystals when the crystals mentioned by contributors to > the list, eg 3.6864MHz give exact bald rates? The book lists the most-commonly-used crystals... The tables show that you can get baud rates that are "close enough" without having to buy special "exact baud rate" crystals. -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499 (personal) === http://www.netcom.com/~fastfwd (business)