Bizarre question: I'm driving my PIC16F877 with a 19.6608 MHz oscillator (Digikey didn't have the 20.000 MHz ones in stock :-). Everything worked happily, until I started experimenting with the hardware USART, at 9600 baud. I set the BRG to high speed, with its divisor at 127: 19.6608 MHz / (16 * (127 + 1)) = 9600, exactly. Fine. But when I ran my program, I got a slew of framing errors, in both directions. After much experimentation and pulling out of hair, I discovered that the setup worked perfectly if I set the divisor to 121. But, if we reverse the equation: 9600 baud * 16 * (121 + 1) = 18.7 MHz. So, the question: Why on earth does my crystal seem to be oscillating at a frequency 5% less than it should? Now that I've got everything working the question is solely academic, but nevertheless I'm quite curious what could be going on. It seems unlikely (albeit not impossible) that Digikey shipped me the wrong oscillator. Thanks and best regards, Jake -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads