Wednesday, September 22, 2010

Getting the LED to blink

Getting the onboard LED to blink is the microcontroller equivalent of a "Hello World!" program. Here's how to do it with the Launchpad.

1. Open Code Composer Studio (CCS). This can be downloaded for free from the TI website.

2. Connect the Launchpad to your computer via the USB cable. A green light should turn on, indicating that the Launchpad is receiving power.

3. In CCS, under the heading File, select New CCS Project. Give your project a name, and click Next.

4. Make sure that your Project Type is set as MSP430. Click Next.

5. Click Next again.

6. Make sure that your device variant is set to MSP430G2231, which is the chip on the Launchpad. Click Finish.

7. In the Navigator, right click on your project, and click Add Files to Project. (If the Navigator is not displayed, you can bring it up by clicking Navigate > Shown In > Navigator).

8. Add the file "MSP430x2xx_fet.c". This file should be located somewhere in the File you created when you downloaded CCS; On my computer the file can be found by navigating from the Texas Instruments folder > ccsv4 > msp430 > examples > msp430x2xx > C-source. Note that we chose msp430x2xx because our device is the msp430g2231, and we chose C-source code instead of hard-to-understand assembly code. You may wish to change the #include statement to #include "msp430g2231.h", but I've found that the included #include statement works anyways.

9. Under Target, click Debug Active Project.

10. Disconnect your Launchpad from the USB cable, then reconnect it. The LED should start blinking.

Saturday, September 18, 2010

Background

Hey! I'm Gautam Goel, Gautam like the city Gotham in Batman, Goel like what you kick a soccer ball into. I've started this blog to document my progress (or lack thereof) with the MSP430 line of microcontrollers from Texas Instruments. I am by no means an expert in embedded electronics, but I do have some programming experience. Hopefully, this blog will help other hobbyists get started with the MSP430. I'll be using the Launchpad development tool from TI, so if you have one, you're in the right place. If you don't, I recommend getting one here, they're only $4.30 with free shipping!