On 5/30/07, Phillip Coiner wrote: > Hi Brent & Jinx > > 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? > 18f6620 is not recommended for new design. its more modern replacement, the 18f6622, has a better baud rate generator. In particular, it has a BRG16 bit. With a 4MHz oscillator, it can do 111111 baud. This is 3.5% error, which is close enough. (I wouldn't design a real product with this much error though -- if the tolerances add up the wrong way it might quit working.) See the last line of table 20-3 in the datasheet. Regards, Mark markrages@gmail -- Mark Rages, Engineer Midwest Telecine LLC markrages@midwesttelecine.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist