Lab Experiment No. 10 Introduction to TI MSP430 Launchpad

Total Page:16

File Type:pdf, Size:1020Kb

Lab Experiment No. 10 Introduction to TI MSP430 Launchpad

Lab Experiment No. 10 Introduction to TI MSP430 LaunchPad

I. Introduction Microcontrollers are used in a wide variety of control and processing applications, including: mobile phones, home appliances, automobile electronics and toys. Almost any electronic device that you use contains a microcontroller in one or many subsystems. The purpose of this experiment is to introduce the TI MSP430 LaunchPad, introduce TI Code Composer Studio and become familiar with microcontroller features and functions. During this experiment you will: a) Learn about the different types of inputs and outputs of a microcontroller. b) Create a new CCS Project. c) Program the TI MSP430 LaunchPad to blink an LED.

II. Components, Instruments and Software The components, instruments and software required for this lab are listed below.

Microcontroller: TI MSP430 LaunchPad

Software: TI Code Composer Studio Version 5

III. Programming the TI MSP430 LaunchPad In this portion of the experiment you will use CCS to program the MSP430 to blink an LED. 1) Open up CCS and create a new CCS Project by navigating to File → New → CCS Project. You will then be prompted by the screen shown in Figure 1. Figure 1: New CCS Project Dialog Box This dialog box allows you to name the project, select its directory, select the microcontroller model used and select what connection will be used. Make sure the device information of your new CCS Project matches that of Figure 1. Click finished after your device is selected. This will create a blank main.c source code file which will contain all of the code that will be loaded onto your MSP430. 2) Next, you will copy the ISR_Blink.c code provided into your new main.c file in your CCS Project.

3) Once you have copied your code over you will load it onto the MSP430. Connect your MSP430 to a USB slot on your PC. Next, click the debug button on the tool bar.

Figure 2: Debug Button

After the compiler is done building your code, click the green play button in the debug window to run your code. Your LED should be blinking!

IV. Post-lab Assignment 1) What is the hexadecimal number that will set the P1DIR register so that P1.0 and P1.6 are GPIO outputs? 2) How many analog inputs are on the MSP430? How many GPIO pins are there? 3) What are the maximum frequencies of the MCLK, SMCLK and ACLK? 4) Explain the function of the digitally controlled oscillator (DCO) of the MSP430. 5) Download the MSP430x2xx Family User’s Guide from http://www.ti.com/lit/ug/slau144j/slau144j.pdf. Determine the 10-bit binary number that will set the TACTL register to: a. Use SMCLK as its source. b. Use a clock divider of 1. c. Continuously count.

Recommended publications