Beruflich Dokumente
Kultur Dokumente
By Adrian Fernandez
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
Rapid Prototyping
Access to all MSP430 Value Line pins Easy interface for external components/daughter boards 2 Programmable pushbuttons & LEDs
LED1 (red) = P1.0 LED2 (green) = P1.6 Switch1 = P1.3 Switch2 = Reset Timer UART Transmit = P1.1 Timer UART Receive = P1.2
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 projects code.
6. This will create a new workspace for our first LaunchPad project!
2. Next, we need to name the project well call it LaunchPadLED. Then, click Next
3. In the next window, well be asked to Slect a type of project. Since we are programming an MSP430 Value Line device, we choose MSP430 from the drop down list. Then, click Next
14. We will use msp430x20x3_1.c in for this example. We can double click it to open the .c file. This code example uses a software toggle to blink port 1.0 (which is tied to LED1, LaunchPads red LED) 15. Now, we can copy and paste this code into our empty main.c that we created in CCS!
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.
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! 23. Congratulations! You just completed your first LaunchPad project!