Bill, Using BRG16 =3D 1 and BRGH=3D 1 changes the formula to Fosc / ( 4 * rate ) = - 1, resulting in many more options of dividers. With FOsc =3D 48MHz and the above setting you can obtain all the normal baud rates from 300bps and up with an error of at most 0.2%. Isaac Em 23/3/2012 09:30, Bill Stoddart escreveu: > Thanks to everyone who chimed in, it got me thinking through the problem > better. > > I think I am doing the calculations correctly but some of the baud rates > I'd chosen must have had too much of an error. > > I am able to run at 9600 with 8 bit, BRGH=3D0, BRG=3D78 and at 115200 wit= h 8bit > BRGH=3D1, BRG=3D25. > > I tried to run 9600 with 8bit BRGH=3D1, BRG=3D311 with no luck. > > This is all still using 48MHz. > > Thanks again > Bill > > On Fri, Mar 23, 2012 at 7:26 AM, wrote: > >>> A 'hexadecimal' crystal is more suitable for common baud rates, but >>> whether you can or do use one depends on the functional priorities. For >>> example if a microsecond timer is more important than comms, then a >>> 20MHz would be preferable (for the 200ns cycles). You might have to >>> compromise somewhere >>> >>> An 18.432MHz crystal in the calculations >>> >>> ((18432000/115200)/16)-1 >>> >>> =3D 9.000000, no error >>> >> There is also a 19.something that gives exact baud rates (19.66088? or >> something like that). The other option would be to 'overclock' slightly = at >> twice 12.288 which is also an exact baud rate frequency (hence it tended= to >> be used as the standard frequency for 8080 CPUs). >> >> >> -- >> Scanned by iCritical. >> >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> > > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .