Professional Documents
Culture Documents
Msp-Exp430G2 Launchpad Workshop: - Meet The Launchpad - Lab 1: Blink Launchpad Leds
Msp-Exp430G2 Launchpad Workshop: - Meet The Launchpad - Lab 1: Blink Launchpad Leds
LaunchPad Workshop
• Meet the LaunchPad
• Lab 1 : Blink LaunchPad LEDs
By Adrian Fernandez
Meet the LaunchPad
MSP430 MCU Value Line LaunchPad – only $4.30
A look inside the box
Complete LaunchPad kit includes:
• LaunchPad development board
• Mini-USB cable
• 2x MSP430 Value Line MCUs
• MSP430G2211
• MSP430G2231
• 10-pin PCB connectors/headers
• Free downloadable, code-limited IDEs
• Code Composer Studio
• IAR Embedded Workbench
• QuickStart Guide
• 2x LaunchPad stickers
Watch unboxing Watch pre-loaded demo
http://www.youtube.com http://www.youtube.com/
/watch?v=RVHGjgkFPlU watch?v=U0mGoRtYbyg
3
MSP430 MCU Value Line LaunchPad – only $4.30
LaunchPad board
Value Line
program devices
MSP430 Rapid Prototyping
• Up to 20-pin DIP
socketed target board • Access to all MSP430
• Drop-in any MSP430 Value Line pins
Value Line device • Easy interface for external
• Pre-programmed components/daughter
MSP430 Value Line boards
MCU included • 2 Programmable
pushbuttons & LEDs
Lab 1 : Blink LaunchPad’s LEDs
In order to blink the Red and Green LEDs, we have to set Ports 1.0 and 1.6
as outputs, and toggle them in our project’s code.
MSP430 Ultra-Low Power MCUs
Step 1 – Download and Install CCS
1. Go to www.ti.com/launchpadwiki - #1 source for all content related to
LaunchPad
2. If not already on your PC, download and install CCS ver 4 to your PC
from the LaunchPad wiki
3. Once installed, open CCS version 4
4. When opened, you will be prompted to create a new “Workspace” –
This can be named anything you want! In our example, we named
ours “LaunchPadWork”
5. Then press OK…
6. This will create a new workspace for our first LaunchPad project!
MSP430 Ultra-Low Power MCUs
Step 2 – Set up CCS project
1. Once our workspace is generated, we will create
a new project
– File New CCS Project
15. Now, we can copy and paste this code into our
empty main.c that we created in CCS!
MSP430 Ultra-Low Power MCUs
Step 5 – Modify code example
16. Since the code example only toggles P1.0, only LED1 (red) will blink if
we leave the code as is. Thus, we need to modify it to also toggle P1.6
as well.
19. Also, notice that this for loop will loop forever. The frequency of
blinking is controlled by the variable ‘i’, which causes a delay using a
“do-while” loop… The larger the number, the longer the delay between
toggles. We can experiment with different values to see its effects.
MSP430 Ultra-Low Power MCUs
Step 7 – Download code to LaunchPad
20. Great! We have made all the changes needed to blink both LEDs on
the LaunchPad board. We can now download this code to the
MSP430 Value Line device plugged into LaunchPad’s DIP target
socket. First, make sure LaunchPad is plugged in to your PC!
21. Next, we can click this “Debug” button, which will check the code and
load it into the MSP430 device.
22. When the code successfully loads, we will enter the Debug view of
CCS. We can execute the code by clicking the green “Run” arrow. At
this point, our red and green LEDs on the LaunchPad board should
start blinking!
• Please feel free to contribute your own project ideas to the wiki pages as
well!
• Thank you, and happy coding from the MSP430 team in Dallas, TX ☺
MSP-EXP430G2
LaunchPad Workshop
Thank you!