Adam Smith wrote: > 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? What's special about 3.6864 is that it is an integral multiple of the usual serial rates (1200, 2400, 9600, etc.), so you can divide down to them with no error at all. I suppose that the same would apply to software implementations - the length of a serial bit would be an integer number of instruction clocks. Anyhow... the 3.6864 crystal and a 38.4 Kbps data rate would give you a theoretical bit rate error of zero. (In practice, there would be some very small error, because the accuracy of crystals is not perfect, so the clocks at each end would be very slightly different. We're talking less than 0.1% even with cheap crystals at both ends of the connection.) Having a clock error of zero gives you the best possible conditions for an error-free link, since your UART will be sampling right in the middle of the bits where the signals are nice and settled. There are some software UART implementations on piclist.com. I haven't tried any of them. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads