> At 4MHz for Fosc, according to the formula in the data sheet, for 38400 > baud > you need a divisor of 0.627 for BRGH= 0, and 5.5104 for BRGH=1. Now at > BRGH=1, using 5 as the divisor (it can only be an integer) you end up with > an actual baud rate of 41666.6, which is an error of 8.5%. Using 6 as a > divisor (again nearest integer the other side) gives a baud rate of > 35714.2, > which is an error of -6.99%. Now anything over about 4% is likely to > introduce errors(allowing for small errors at the other end), so these > equate to what you see. You can get zero baud rate error by choosing a crystal whose frequency is an exact multiple of 64 * Bit rate There are many standard crystals that meet this criteria. For example, at 115,200 bits per second, you could use a 7.3728 MHz crystal. To stay under 4MHz, you could use 57,600 bits per second and use a 3.68640 MHz crystal. The highest crystal frequency you can use under 20MHz for 115,200 bits per second is 18.432 MHz. Bob Ammerman RAm Systems _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist