It could be a hardware problem. In the data sheets from Texas Instruments, it is recommended to use for the LF mode the watch crystals 32.768 Hz. Then the internal capacitors (12-pF) are matched for this frequency. If you use a higher frequency in the LF mode, it is possible that you have to change the capacitor ( by adding external capacitors). First check if the clock for the LF mode works stable. If use the HF mode your frequency must be at least 450 kHz.
Sascha -----Ursprungliche Nachricht----- Von: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net]im Auftrag von Garst R. Reese Gesendet: Dienstag, 25. November 2003 17:06 An: mspgcc-users@lists.sourceforge.net Betreff: Re: AW: [Mspgcc-users] 100kHz xtal Sascha Boyd wrote: > > As i understand your C-code, the division by 8 for the timer A is too much. > Try it without the division by 8. That is in a comment. Garst > Best regards > > Sascha > > -----Ursprungliche Nachricht----- > Von: mspgcc-users-ad...@lists.sourceforge.net > [mailto:mspgcc-users-ad...@lists.sourceforge.net]im Auftrag von Garst R. > Reese > Gesendet: Dienstag, 25. November 2003 15:09 > An: mspgcc > Betreff: [Mspgcc-users] 100kHz xtal > > Hi folks, I have a 100kHz LF xtal drivin ACLK, but the following setup > is giving me pulses spaced 1ms apart. Has anybody had any experience > trying to use a 100kHz xtal instead of the usual 32kHz? It looks like > I'm getting a subharmonic. > > Thanks, > Garst > void setup_timerA(void) > { > unsigned temp; > > #ifdef _SHOW_YELLOW_LED_ > /*P1.6 is also connected to the IrDA CD pin*/ > P1SEL |= BV(6); > P1DIR |= BV(6); > > #endif > //Assumes ACLK = 100kHz, MCLK = 3.6864MHz > > // set up timer A for 250us SAMPCON to ADC12 > TACTL = TASSEL_ACLK + MC_UPTO_CCR0;// + ID_DIV8; > TACCR0 = 25; //RESET when TAR==CCR0 > TACCR1 = 22; //SET when TAR==CCR1 > TACCTL1 = OUTMOD_SET_RESET; //Mode 3: set_reset > > /*Start Timer*/ > TACTL |= TACLR; > TACTL &= ~TACLR; > > } > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users