I know it, but I need my 16MHz crystal to generate "exact" 10ms sample periods in my project. If I use a crystal that generate standard RS2 baud rates, I can't get exact 10ms... This is the reason for trying to "force" the PC to talk in other baud rates. I thought perhaps the 16XXX of the PC UARTs have clock generation with more than the 8 bits of SPBRG in the PIC. This way I could get less than 2,13% error between both baud rates. Thanks, anyway, Alvaro Deibe Diaz. ----- Original Message ----- From: "Bob Barr" To: Sent: Friday, March 08, 2002 7:45 PM Subject: Re: [PIC]; UART baud rate and Visual Basic > On Thu, 7 Mar 2002 21:55:40 +0100, Alvaro Deibe Diaz wrote: > > >Hi, > > > >Do you know of some kind of OCX for Visual Basic that > >allows it to "talk" in baud rates that can be obtained > >from standard (4MHz, 8MHz, 10MHz, 16MHz, 20MHz) xtals > >without errors? > > > > You may be better off using a crystal that can generate exact baud > rates rather than trying to tweak the PC end of things. IIRC, the > UARTs in the PC use a fixed clock frequency to derive their baud > rates. > > The crystals that you have listed can be called 'standard' only in the > sense that they are exact numbers of MHz. There are many other > standard crystal frequencies available. > > Digikey, for example, has Citizen crystals with frequencies of > 3.6864MHz, 7.3728 MHz, 9.216MHz, 14.7456 MHz, and 18.432 MHz. > > Unless you really need the additional speed of the slightly higher > frequncies that you've listed, each of these crystals will generate > standard baud rates in the PIC's USART. Just pick the appropriate one > so as to not exceed the speed rating of your PIC. > > > Regards, Bob > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads