oPossum 1,083 Posted July 17, 2011 Share Posted July 17, 2011 The MSP430F1612 on the Launchpad provides a 12 MHz clock to the TUSB3410 chip. This clock can also be used by the MSP430 in the 20 pin socket. Clock on pin 49 of F1612 Mask off pin 49 with Kapton tape and solder a 1k resistor to the pin. Connect the other end of the resistor to the lower pad of C21 using a short wire. This test program will flash the red LED five times with the DCO at ~1 MHz and then switch to the 12 MHz external clock. #include "msp430g2231.h" void main(void) { unsigned i; volatile unsigned n = 0; WDTCTL = WDTPW | WDTHOLD; P1DIR = 0x01; P1SEL = 0x00; i = 10; do { P1OUT ^= 1; while(--n); } while(--i); BCSCTL3 = LFXT1S0 | LFXT1S1; // - Set XT1 clock type as external do { // - Wait for MSP430 to detect clock is stable IFG1 &= ~OFIFG; // Clear OFIFG n = 250; while(--n); // Wait a while } while(IFG1 & OFIFG); // Loop until OFIFG remains cleared BCSCTL2 = SELM1 | SELM0 | SELS; // - Use LFXT1CLK as clock source do { P1OUT ^= 1; while(--n); } while(1); } jsolarski, frozencarbonite, tripwire and 9 others 12 Quote Link to post Share on other sites
SugarAddict 227 Posted July 17, 2011 Share Posted July 17, 2011 Nice! Works like a charm Quote Link to post Share on other sites
zborgerd 62 Posted July 17, 2011 Share Posted July 17, 2011 You are awesome! Another great post, as always. Quote Link to post Share on other sites
bluehash 1,581 Posted October 4, 2011 Share Posted October 4, 2011 How did I miss this post! Blog.. come here. I need to publish this. Quote Link to post Share on other sites
SugarAddict 227 Posted October 5, 2011 Share Posted October 5, 2011 You would have never missed this had you chilled in IRC with us while we talked about it... :-P Quote Link to post Share on other sites
bluehash 1,581 Posted October 5, 2011 Share Posted October 5, 2011 You would have never missed this had you chilled in IRC with us while we talked about it... :-P True. Sigh Quote Link to post Share on other sites
rockets4kids 204 Posted October 5, 2011 Share Posted October 5, 2011 Also woud have been nice of some credit was given to the person who originally proposed the idea on #43oh... Quote Link to post Share on other sites
bluehash 1,581 Posted October 5, 2011 Share Posted October 5, 2011 ... and that was? Credit to both who suggested and implemented it. Quote Link to post Share on other sites
oPossum 1,083 Posted October 6, 2011 Author Share Posted October 6, 2011 I was made aware that the G series can accept an external clock despite the spec sheet saying it is not supported by this thread When I was working on the CIR capture project, I tried using the clock from the FTDI chip. This worked with PIC, but the MSP430 was not happy with the stability and would at times switch back to internal osc. So, after disappointing results with the FTDI clock, I used the 12 MHz clock on the Launchpad itself. This worked well. I didn't mention this in the project writeup because it made it dependent on the Launchpad or a oscillator module that seems to be very hard to find in a thru hole 3.3v variety (5V are common, but not 3.3). Several months later there was some talk about this on IRC. My recollection of the IRC is that no one knew exactly how to do it. So I make this post to show how I had done it for my CIR project. SugarAddict and bluehash 2 Quote Link to post Share on other sites
bluehash 1,581 Posted October 6, 2011 Share Posted October 6, 2011 Well, thanks for the explanation opossum and sharing it here. Quote Link to post Share on other sites
RobG 1,892 Posted October 6, 2011 Share Posted October 6, 2011 How about making your own xtal osc module? Little logic SN74LVC1GX04 is perfect for that. Pin 2 to GND on LP Pin 6 to XIN Pin 5 to XOUT (XOUT will power the chip and can be used to turn osc on and off.) Quote Link to post Share on other sites
hlipka 11 Posted October 6, 2011 Share Posted October 6, 2011 I was made aware that the G series can accept an external clock despite the spec sheet saying it is not supported by this thread I just looked up the 2xxx family user guide (slau144h). It says XT2CLK: Optional high-frequency oscillator that can be used with standard crystals, resonators, or external clock sources in the 400-kHz to 16-MHz range. and describes this in a little bit more detail on page 278. The TI page for e.g. the G2213 also explicitly states 'external digital clock source' as a feature (though the data sheet leaves XT2 as clock module out). Quote Link to post Share on other sites
oPossum 1,083 Posted October 6, 2011 Author Share Posted October 6, 2011 You have to look at the spec sheet for the specific part. bluehash 1 Quote Link to post Share on other sites
OppaErich 25 Posted October 6, 2011 Share Posted October 6, 2011 NOTE: Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.