Stephen D. Barnes wrote: > According to the datasheet for the 18F4320 (DS39599B) the internal > oscillator runs at 8MHz. +/- the precision of the INTOSC, of course, and verify that you don't use the INTOSC postscaler... > If I am correct, the datasheet tells me that the internal oscillator is not > divided by 4 in the way an external timing source would be (crystal, clock, > resonator...applied to OSC1 and OSC2 pins). None of the possible clock sources are devided by 4, as far as I know. *But*, the "instruction cycle" time is Fosc/4 (or rather the invers of Fosc/4) no matter the source of Fosc (xtal, external clock, INTOSC...) but that's not directly related to the baud rate generator calculation.). Where does in say the that clock is divided by 4 ? > For USART configuration, should > I use a value of 32MHz No. 8 Mhz. > I am having problems with USART communications...it > does not work In what way ? > and I believe the problem may be that I have done the baud > rate calculation using the 8MHz INTOSC value as FOSC in the > equation above. Shouldn't be that. > Am I on the right track? Yes. 20 Mhz xtal -> use 20 Mhz in UART formulas. 8 Mhz INTOSC -> use 8 Mhz in UART formulas. If you "feed" the PIC with an external clock, use the freq of that clock in UART formulas. So there is no divide by 4 in either case. To verify your UART settings, you could always connect a xtal (and reconfigure the CONFIG settings) to get a know/better Fosc precision and verify your UART settings from that. Jan-Erik. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu