I have used the RS232 interface successfully at 9600 using the watch crystal. I’ve tried two high frequency crystals (8 MHz and 1.8432 MHz) in the Q3 socket. In both cases I can put the high frequency clock from the crystal in Q3 to a pin and view on an oscilloscope. I did notice that the signals looked more like a squashed sine wave than a square wave…I know it’s not going to be perfect, but it that may be part of my problem…read on…
My problem is that I can’t use these high frequency crystals to drive the UART. I’m using TI’s examples, some exact and some slightly modified, but get nothing. I expect it is not a software problem…I think I understand the software configuration b/c the documentation is very good. Should I add additional caps? Any ideas would be appreciated.
You could also put the DCO clock on another pin and use the same oscilloscope to look and compare with your Q3 clock.
After POR, the DCO is about 0.7 MHz. You could program it up to about 5 MHz. The frequency is not accurate enough for UART, but this exercise is just to see the waveform. The squashed sine wave you saw could be due to your scope or the way you use the probe.
Thanks OldCow. I did that and the 1.8432 MHz again and the signal looks very good…I don’t know what changed. I’ve pasted some of the initialization code from a TI example below. I’ve determined it is not making it past the OSCFault test. The signal looks good on the scope. Any ideas ? Thanks.
void main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P3SEL |= 0x30; // P3.4,5 = USART0 TXD/RXD
BCSCTL1 |= XTS; // ACLK= LFXT1= HF XTAL
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0xFF; i > 0; i–); // Time for flag to set
}
while ((IFG1 & OFIFG)); // OSCFault flag still set?