This is a multi-part message in MIME format. ------=_NextPart_000_0031_01C4C299.D6C0F050 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit > Bob Ammerman wrote: >> You can get zero baud rate error by choosing a crystal whose frequency >> is an exact multiple of >> >> 64 * Bit rate > > True, but it only NEEDS to be a multiple of 16, at least on PICs that have > the "high speed" baud rate generator option. > Awk.... my bad. Which invalidates most of the content of my last post on this matter. To make it clear what Olin is talking about, on many newer PICs (nearly all the current ones?) there are two choices for baud rate calculation: with the BRGH bit set, the baud rate is Fosc/(16*(BRG+1)) with the BRGH bit clear, the baud rate is Fosc/(64*(BRG+1)) This implies several things. 1) To get relatively low baud rates when you have a fast clock you have to use the formula where BRGH is clear. 2) To get high baud rates setting BRGH lets you get better resolution. Attached is a PDF with a table showing the maximum crystal frequencies (below 4Mhz and 20MHz) that will provide a perfect frequency for various popular baud rates. It takes into account the BRGH bit. Some of the entries are 0 indicating that there is no possible crystal to do the job. This is either because: 1) the baud rate is too low and the divisor register would have to be set to a value > 255, or 2) the baud rate is too high Bob Ammerman RAm Systems ------=_NextPart_000_0031_01C4C299.D6C0F050 Content-Type: application/pdf; name="Baud Rates.pdf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Baud Rates.pdf" %PDF-1.2 =0D%=E2=E3=CF=D3 =0D8 0 obj=0D<<=0D/Length 9 0 R=0D/Filter /FlateDecode =0D>>=0Dstream H=89=C5=94=CDN=C30=0C=C7=9F=A0=EF=90=E38=AC=D8=8Ec'=12\=A6=F1q=E1=82=F6=02= |l = =8E|=08iOO=D3tk:=9A2=0E=08U=AA"=FF=FF=F2=CFv=DC.V=95S=A3=E0ku=C6=AC=96=15= =98=F8=BC>=99=EA=F4=12LH=E1M5=87=1AD=A49?4=B2Y}=9A=D9=E2=EE=E3=F1=C4=AC^*= +=D1=15=A3K=D3=D8TCk=9B-n=AF=AE=CF=B1=B58=EE=F4=14=84=14t=B5=1B=84=93W=EC= =88wN=10jrf=8E=D4U=DA=A0=10(=91n=EF=DE=D7c=A5=00s2=DC=AF=DF=DE=CF=F8=E6y;= =AC&v=05=DE=0F<=D7=DB=C3=E2=A2=0B-f.=82]=AA}=B1=D1Dn=E8=E9R=CD1=E8A=ED=8D= =1B=B5=CBH=0C=A9G=EB=A3=AB=EB=DD=86`=05=BE=0F*=8F=07=EE=E3)B=92=A5=C0=10=C4= =03=EC=06=88=D1=9D=D50c=FFO=E0 = =BF=02=8B=97=DD=88=9C=F6=F7;=C4=F4[=83A=04|Oow8=C7c=A0Ne;=DE=DF=9F=E2=AD=E7= 1|=8E=C9=F0=C4Ne=1C=9Fq~=81=EF=D3=1D=83=9F=E8=DE=BA=FD=BC2=BCgK0=81W=F1?=E0= =BDN=AE=D61]=D3=C1=85=A3=DB=DF=B8=CFz8=9E=9Aw=95QY=D9I=89J=16=F8=CF=A9=17= =CD=FF=9Bcr=A7=E9[=8Agd4=AFk=B3=A9=02=D6=87=0A= =C4s+"=BB =95=00=CB=9ApQ=B3=A4E=AD],E=DF=BCIio=E95 = =B6=A4=F86MA=14-=A7L=E3)=88L%=85=C2=04=0F=A5=CC=03[=E6=B9=80%%=8D=EC=9B=F8= =05:=1B=8C=CD=0Dendstream=0Dendobj=0D9 0 obj=0D421=0Dendobj=0D4 0 = obj=0D<<=0D/Type /Page=0D/Parent 5 0 R=0D/Resources <<=0D/Font <<=0D/F0 = 6 0 R =0D>>=0D/ProcSet 2 0 R=0D>>=0D/Contents 8 0 R=0D>>=0Dendobj=0D6 0 = obj=0D<<=0D/Type /Font=0D/Subtype /TrueType=0D/Name /F0=0D/BaseFont = /Arial=0D/FirstChar 32=0D/LastChar 255=0D/Widths [ 278 278 355 556 556 = 889 667 191 333 333 389 584 278 333 278 278 =0D556 556 556 556 556 556 = 556 556 556 556 278 278 584 584 584 556 =0D1015 667 667 722 722 667 611 = 778 722 278 500 667 556 833 722 778 =0D667 778 722 667 611 722 667 944 = 667 667 611 278 278 278 469 556 =0D333 556 556 500 556 556 278 556 556 = 222 222 500 222 833 556 556 =0D556 556 333 500 278 556 500 722 500 500 = 500 334 260 334 584 750 =0D556 750 222 556 333 1000 556 556 333 1000 667 = 333 1000 750 611 750 =0D750 222 222 333 333 350 556 1000 333 1000 500 = 333 944 750 500 667 =0D278 333 556 556 556 556 260 556 333 737 370 556 = 584 333 737 552 =0D400 549 333 333 333 576 537 278 333 333 365 556 834 = 834 834 611 =0D667 667 667 667 667 667 1000 722 667 667 667 667 278 278 = 278 278 =0D722 722 778 778 778 778 778 584 778 722 722 722 722 667 667 = 611 =0D556 556 556 556 556 556 889 500 556 556 556 556 278 278 278 278 = =0D556 556 556 556 556 556 556 549 611 556 556 556 556 500 556 500 = =0D]=0D/Encoding /WinAnsiEncoding=0D/FontDescriptor 7 0 = R=0D>>=0Dendobj=0D7 0 obj=0D<<=0D/Type /FontDescriptor=0D/FontName = /Arial=0D/Flags 32=0D/FontBBox [ -250 -212 1213 1000 ]=0D/MissingWidth = 277=0D/StemV 80=0D/StemH 80=0D/ItalicAngle 0=0D/CapHeight 905=0D/XHeight = 453=0D/Ascent 905=0D/Descent -212=0D/Leading 150=0D/MaxWidth = 1011=0D/AvgWidth 441=0D>>=0Dendobj=0D2 0 obj=0D[ /PDF /Text = ]=0Dendobj=0D5 0 obj=0D<<=0D/Kids [4 0 R ]=0D/Count 1=0D/Type = /Pages=0D/MediaBox [ 0 0 612 792 ]=0D>>=0Dendobj=0D1 0 = obj=0D<<=0D/Creator = =0D/CreationDate (D:20041104180831)=0D/Title = =0D/Author = =0D/Producer (Acrobat = PDFWriter 4.05 for Windows NT)=0D>>=0Dendobj=0D3 0 obj=0D<<=0D/Pages 5 0 = R=0D/Type /Catalog=0D>>=0Dendobj=0Dxref=0D0 10=0D0000000000 65535 f = =0D0000002106 00000 n =0D0000001991 00000 n =0D0000002403 00000 n = =0D0000000535 00000 n =0D0000002022 00000 n =0D0000000653 00000 n = =0D0000001738 00000 n =0D0000000019 00000 n =0D0000000516 00000 n = =0Dtrailer=0D<<=0D/Size 10=0D/Root 3 0 R=0D/Info 1 0 R=0D/ID = [<639462b0d816cbd1f1b09c0d56828094><639462b0d816cbd1f1b09c0d56828094>]=0D= >>=0Dstartxref=0D2452=0D%%EOF=0D ------=_NextPart_000_0031_01C4C299.D6C0F050 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist ------=_NextPart_000_0031_01C4C299.D6C0F050--