Other Parts Discussed in Thread: MSP430G2231
Hi all,
Is it possible to output the LFXT crystal frequency on one of the ports on the MSP430G2231? Please, if so, how? If not ,which device will do that?
thanks, bigM
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Other Parts Discussed in Thread: MSP430G2231
Hi all,
Is it possible to output the LFXT crystal frequency on one of the ports on the MSP430G2231? Please, if so, how? If not ,which device will do that?
thanks, bigM
From POR state, If you set both BIT0 of P1DIR and BIT0 of P1SEL, ACLK will show up at P1.0 as output.
If LFXT1 is ACLK, then you get what you want. But ACLK may be off. ACLK can also be LFXT1/2, LFXT1/4, LFXT1/8, VLO, VLO/2, VLO/4, VLO/8, E (external digital clock), E/2, E/4, E/8.
Good morning O_C_Y,
When you say ACLK may be off, is that because sometimes the system starts up with ACLK not addressing the LFXT1 - kind of random - or because something was not properly set? Is there a sample program that does this?
thanks, bigM
After Power Up Clear (PUC), the settings of various registers (see below) inside the G2xx will enable the LFXT1 oscillator with internal load capacitor of ~6pF. This settings will also select LFXT1 divide by 1 as the source of ACLK. If you have soldered the 32768 Hz crystal to the XIN & XOUT pins, it should start to oscillate. But this oscillator uses very low power and is very slow to start. And the crystal included in t LaunchPad kit calls for ~12pF instead of ~6pF load capacitor. Thus you should change the XCAPx bits of the BCSCTL3 register and your code needs to wait for the oscillator to start.
The registers that control the LFXT1 oscillator are: BCSCTL3: LFXT1x and XCAPx bits, P2SEL: BIT7 and BIT6, SR: OSCOFF bit. BCSCTL1:DIVAx bits select a divider for ACLK.
Me again,
In your reply you mentioned P2SEL: BIT7 and BIT 6. The MSP430G2231 doesn't have those pins/bits. Am I using the wrong device? I ran a test program MSP430G2xx1_LPM3 and it works with the crystal as described. I just want to output the crystal frequency on one of the ports using the MSP430G2231 part.
thanks, bigM
P2SEL is a register. If you set both BIT7 and BIT6 of that register, pin#12 and pin#13 become XOUT and XIN respectively.
Pin#12 can also be used as P2.7. Pin@13 can also be used as P2.6 or TA0.1 (output from TimerA CC0).
As I told you in my first reply, if you set BIT0 of both P1SEL and P1DIR registers, pin#2 will become an output pin driven by ACLK.
Pin#2 can also be used as P1.0 or as TACLK (input as TimerA clock).
All the above are in stated in the Data-sheet.
**Attention** This is a public forum