ez430f2013’s Hello World

In MSP430 by Hoani Bryson

If you want to get something simple running up on your ez430f2013, then you have come to the right place. This example uses the mspgcc toolchain in Ubuntu.

What You Need

  • MSPGCC toolchain. Check out this article on how to install this in Ubuntu

Hello World Source Code

  1. Disables the watchdog
  2. Set the system clock frequency to 8MHz
  3. Configure the timer to trigger interrupts every millisecond
  4. Configure the LED pin (P1.0) as an output
  5. Enable interrupts
  6. Loop forever and toggle every 250ms

Building and Programming

Unzip the downloaded source code.
Using the terminal, navigate to the extracted folder:

Plug the ez430f2013 into a usb port and locate the device:

Now that we know the location of the device, we can point the mspdebug tool to it:

Now we have programmed the device and it will flash every 0.5 seconds.