Hi Mark, Thanks for your response. What is special about the number 3.6864 MHz? Does it work equally well for hardware and software implementations? If I want to operate the link at 38.4kbps, and use a 3.6864 MHz crystal, what kind of error rate are we looking at? Should I use software or hardware USART? If software, should I use an interrupt-driven implementation? If so, can you suggest any to me? Thanks again, Adam Smith > Adam Smith wrote: > > > > So I can handle the memory and the output fairly easy using the methods > > described for them, but I'm not so sure what to do about the first one. > > My chip of choice right now is a 16F872. I was considering going for a > > 16F873 which has a USART peripheral and a little more program space but > > is double the cost. I was thrown off, however, when I was reading the > > error rates in its data sheet; it says about 6%. I need it down to 0.1% > > or 0.01%. > > First, a 16F873 isn't "double the cost" of the 16F872, at least not so > far as I can tell. "1.5x the cost" would be more accurate. Still a > significant difference, though. > > The error rates you're talking about are the difference between the > theoretical bit rate and the one that you get from the BRG. It is true > that the error can be significant if you're using one of the "standard" > clocks (4 MHz, 20 MHz, etc.). You can reduce the error to zero for the > usual serial rates by using a non-standard clock frequency of 3.6864 > MHz, or 2x or 4x that frequency. If your serial communication is PIC to > PIC, don't worry about the errors at all, since they will be the same at > both ends of the connection. > > A bit rate generator error of 6% doesn't mean that you'll see an error > rate of 6% when receiving characters! If the connection is short and > noise-free, you would probably see no character errors at all. However, > the noise immunity of your connection would be poor. I've heard varying > advice on what amount of error is acceptable, but you certainly want to > keep it low, say 2% or less. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads