MSP430 launchpad dev kit how too

A few weeks ago I had purchased a few MSP430 Launchpad, originally from Mouser, but there wait times for shipment of the product wasn’t until mid AUG to SEP

and decided that was unacceptable for my terms of getting product and or waiting for parts…..very few times have i waited for more then a month for anything that I wanted, Sugru was different so I waited for it…..but back to the MSP430.

after searching around I found a company that sold it and was in stock, so i Decided to cancel my other orders and go with them, the company was Newark, and i was very happy with there customer service….very friendly and polite. but i have finally gotten it and was able to do a little testing but not much in the way of programming, I haven’t set up the software for it or the library’s. But i did get to solder on the 32KHz crystal that was sent with the board………to my surprise it was a SMD 1.4mm+-.1mm crystal, with the leads .5mm apart from each other. I saw this and wondered why TI hates us hobbyist. I was expecting a regular through hole crystal, like they showed in one of the videos but that’s not the case, so i will do my best to solder one on to the boards and connect all the headers. I chose the regular female headers, sorta like the arduino, and i left the other board blank so i could solder wires and add other interesting gizmos to it and also to have a board that relies on the internal oscillator. so back to the how too……. Installing the crystal is probably the hardest part of the whole kit, just because the crystal is so small and hard to handle, but if you do it smart you can solder this piece in no time flat. So lets begin with things you may need

  • Supplies
  • Launch pad
  • 32KHz crystal
  • soldering iron
  • solder
  • headers
  • Bright lamp
  • electrical tape or tape like substitute
  • odds and ends (lol)(tweezers or other tool for manipulation)

after getting your supplies ready its time to start plugging stuff in and getting things setup


Remember these are small parts and you may want to get you tape ready before taking out the crystal from the packaging. The small size makes it extremely hard to manage and move around efficiently so you may want to grab your tweezers and start arranging it on the board.

after you have arranged it, making sure both leads touch the pads on the board, this took me a few tries to get it right, I barely could see the leads on the thing, so itΒ  might be a good idea to use a loupe or other magnifying device to line it up correctly.

after its lined up correctly you need to tape it down so you can try and solder such small piece. The leads on the crystal will tell what orientation it goes in, they are bent in a way that only one position will have the leads on the pads to solder.

Be very careful, do not bridge the pads, If you do you will have to remove the bridge and solder and start again, this will not ruin the board but its not something that i would look forward to doing. after the leads are soldered you have one more solder point to finish.


near the 2 solder points you will see a third point to solder, its at the top of the crystal ( what i call the top, Opposite of the leads). there are no leads to solder just solder the crystal down on that end, after that your ready to plug things in or finish soldering the rest of the board. you may choose to leave the through holes or solder female or male headers to the board, its all personal preference at this point.

Click to enlarge and see the solder points

after soldering and letting cool down for a moment it should be time to plug in your test chip (the one with the temp sensor and PWM) once you have plugged it in and verified you have it with the correct pins in the right place, turn it on and see if it still works. If you have done your job it will turn on and run the program. If it doesn’t turn on, your on your own, but I will to give you my input to try and help fix it.

Here is a few links to get you started with the MSP430 launchpad on Linux

it is fully supported on Windows OSs

http://losinggeneration.homelinux.org/2010/07/02/msp430-launchpad-on-linux/

http://eclecti.cc/hardware/using-the-ti-msp430-launchpad-with-ubuntu-10-04

In the near future these will be incorporated into other projects, one may be to replace the arduino in the BPM counter to a MSP430G2231 or similar device with an 10bit ADC. Also I will be creating a How to, to program your MSP430 value line using Linux.

BPM counter update is next πŸ™‚

UPDATE!!!

Test program to verify that you have successfullly installed the crystal correctly.
NON-MSPGCC code
//******************************************************************************
// MSP430F20xx Demo - LFXT1 Oscillator Fault Detection
//
// Description: System runs normally in LPM3 with WDT timer clocked by
// 32kHz ACLK with a 1x4 second interrupt. P1.0 is normally pulsed every
// second inside WDT interrupt. If an LFXT1 oscillator fault occurs,
// NMI is requested forcing exit from LPM3. P1.0 is toggled rapidly by software
// as long as LFXT1 oscillator fault is present. Assumed only LFXT1 as NMI
// source - code does not check for other NMI sources.
// ACLK = LFXT1 = 32768, MCLK = SMCLK = Default DCO
//
// //*External watch crystal on XIN XOUT is required for ACLK*//
//
//
// MSP430F20xx
// ---------------
// /|| XIN|-
// | | | 32kHz
// --|RST XOUT|-
// | |
// | P1.0|-->LED
//
// M. Buccini / L. Westlund
// Texas Instruments Inc.
// September 2005
// Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.40A
//******************************************************************************
#include <msp430x20x3.h>
volatile unsigned int i;
void main(void)
{
WDTCTL = WDT_ADLY_1000; // WDT 1s interval timer
IE1 |= WDTIE; // Enable WDT interrupt
P1DIR = 0xFF; // All P1.x outputs
P1OUT = 0; // All P1.x reset
P2DIR = 0xFF; // All P2.x outputs
P2OUT = 0; // All P2.x reset
BCSCTL3 = XCAP_3; //12.5pF cap- setting for 32768Hz crystal
// An immedate Osc Fault will occur next
IE1 |= OFIE; // Enable Osc Fault
while(1)
{
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/interrupt
}
}
#pragma vector=WDT_VECTOR
__interrupt void watchdog_timer (void)
{
_BIC_SR_IRQ(LPM3_bits); // Clear LPM3 bits from 0(SR)
}
#pragma vector=NMI_VECTOR
__interrupt void nmi_ (void)
{
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0xFFF; i > 0; i--); // Time for flag to set
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
}
while (IFG1 & OFIFG); // OSCFault flag still set?
IE1 |= OFIE; // Enable Osc Fault
}

MSPGCC code

//******************************************************************************
// MSP430F20xx Demo - LFXT1 Oscillator Fault Detection
//
// Description: System runs normally in LPM3 with WDT timer clocked by
// 32kHz ACLK with a 1x4 second interrupt. P1.0 is normally pulsed every
// second inside WDT interrupt. If an LFXT1 oscillator fault occurs,
// NMI is requested forcing exit from LPM3. P1.0 is toggled rapidly by software
// as long as LFXT1 oscillator fault is present. Assumed only LFXT1 as NMI
// source - code does not check for other NMI sources.
// ACLK = LFXT1 = 32768, MCLK = SMCLK = Default DCO
//
// //*External watch crystal on XIN XOUT is required for ACLK*//
//
//
// MSP430F20xx
// ---------------
// /|| XIN|-
// | | | 32kHz
// --|RST XOUT|-
// | |
// | P1.0|-->LED
//
// M. Buccini / L. Westlund
// Texas Instruments Inc.
// September 2005
// Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.40A
// modified by justin solarski to work with MSPGCC 4.0
//******************************************************************************
#include <msp430x20x2.h>
#include <signal.h> // must be included for interrupt handler
volatile unsigned int i;
void main(void)
{
WDTCTL = WDT_ADLY_1000; // WDT 1s interval timer
IE1 |= WDTIE; // Enable WDT interrupt
P1DIR = 0xFF; // All P1.x outputs
P1OUT = 0; // All P1.x reset
P2DIR = 0xFF; // All P2.x outputs
P2OUT = 0; // All P2.x reset
BCSCTL3 = XCAP_3; //12.5pF cap- setting for 32768Hz crystal
// An immedate Osc Fault will occur next
IE1 |= OFIE; // Enable Osc Fault
_enable_interrupt(); // enable interrupts added for mspgcc
while(1)
{
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/interrupt
}
}
//#pragma vector=WDT_VECTOR removed for mspgcc
interrupt(WDT_VECTOR) watchdog_timer (void) //__interrupt void watchdog_timer (void) removed for mspgcc
{
_BIC_SR_IRQ(LPM3_bits); // Clear LPM3 bits from 0(SR)
}
//#pragma vector=NMI_VECTOR removed for mspgcc
interrupt(NMI_VECTOR) nmi_ (void) //__interrupt void nmi_ (void) removed for mspgcc
{
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0xFFF; i > 0; i--); // Time for flag to set
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
}
while (IFG1 & OFIFG); // OSCFault flag still set?
IE1 |= OFIE; // Enable Osc Fault
}

** updated Post, Added #include <signal.h> for interrupt handler for MSPGCC, sry it was an oversight