Hi Brent I found a resonator (in stock) that lets me generate 115200 exactly (7.3738MHz) BTW that was exactly the reason I chose 4MHz it made the math easy and I knew for my 4800 baud GPS receiver and application that would be plenty fast. Thanks again for the help. I'm more than grateful..........also to Jinx and Mark for their help. Phillip Things should be as simple as possible but no simpler Phillip Coiner CTO, GPS Source, Inc. Your source for quality GNSS Networking Solutions and Design Services, Now! -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Brent Brown Sent: Wednesday, May 30, 2007 1:58 PM To: Microcontroller discussion list - Public. Subject: Re: [PIC] 18F6620 baud rate generator > Thanks for the spread sheet (Brent) and the formula (Jinx). > Till I can get a different crystal purchased and installed (actually > I'm using a Murata resonator I might have to change a foot print on > my board). I wanted to use my 4MHz crystal but when I set the BRGH > 1(Low Speed) and run through the math I end up with a %8.51 error. > Can anyone tell me if that is close enough to work for now so I can > test my code? That's quite a long way off and almost certainly won't work. Work on more like 2% worst case max. The spreadsheet has a list of some popular crystal freqs in the left most column, those with * next to them will give accurate baud rates. If you ditch your 4MHz crystal and substitute with 3.6864MHz you can get precisely 115200 baud with SPBRG = 1 and BRGH = 1. The only annoying thing with such "odd" crystal frequencies is that it makes other timing tasks seem slightly more awkward, eg. with 4MHz osc it's nice to know that 1 instruction = 1us. -- Brent Brown, Electronic Design Solutions 16 English Street, St Andrews, Hamilton 3200, New Zealand Ph: +64 7 849 0069 Fax: +64 7 849 0071 Cell: 027 433 4069 eMail: brent.brown@clear.net.nz -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist