Question: EE 215 Lab # 5 (First MSP430 Lab) The goal for this lab is to become familiar with programming and debugging the MSP430 using the
EE 215 Lab # 5 (First MSP430 Lab)
The goal for this lab is to become familiar with programming and debugging the MSP430 using the EXP430 F5438 development board. Your report should include answers to all of the questions asked within this document as well as your code. Each line of your code should include a comment that explains its purpose.
Resources:
The Texas Instruments website provides excellent documentation for all of
its products: (Google "MSP430F5438A" and "MSP430F5438 Experimenter
Board "). Links are also provided on BBLearn.
The datasheet for the MSP430F5438A device that is on our development board contains information on physical pin-outs and specific peripheral modules that are available on our chip (ie. Timers, i/o pins, A/D, serial comms).
The "MSP430x5xx Family Reference Guide" contains information on operation and configuration of the peripherals. The data sheet for the development board contains information on the physical connections that are made between the MSP430 and the other useful devices on the board.
The "MSP-EXP430F5438 Experimenter Board Users Guide" contains critical information on the various connections between the MSP and the other devices on the board.
Also, chapters 3 and 4 in "MSP430 Microcontroller Basics" contain programming tips and useful code examples that are pertinent to this lab.
Answer the following questions before you start programming:
Preliminary Concepts
1. Explain the code used to set, clear and toggle a single bit in a register while leaving the other bits unchanged.
2. What information is available in the header file? What useful definitions are made in the header file that we will be using in this lab?
3. Why does each version of the MSP430 have its own header file?
4. On the development board that we are using, what are the physical connections that are provided between the MSP430 and the rest of the devices? Read about some of the interesting features that are on the board.
5. What is the watchdog timer and why does it need to be put on hold for this application? (Our text "MSP430 Basics" p. 276 has a good explanation of this)
Peripheral Register Short forms and Acronyms
The language used in the documentation can be bewildering until you are familiar with the acronyms that are used to describe the registers and the settings and functionalities of each. Using the "find" command in Adobe Reader to locate definitions for specific unknown acronyms is a very useful.
Timer Module
Scan through the chapter on "Timer A" in the MSP430x5xx family reference guide, "MSP430 Basics" p. 287 and following and/or the device datasheet for answers to the following questions:
1. Give a detailed explanation of each of the functions of the bits in the TA1CTL register. Go into the header file for our chip "msp430f5438a.h" and identify the useful definitions that will be used to configure the Timer A module.
2. Explain in words how the Timer A module will be configured using the definitions in the header file.
3. We will use "SMCLK" and "Up-Mode". Explain these options in detail.
Digital I/O Ports We want to toggle "LED1" on the development board:
1. What GPIO pin is this LED connected to?
2. Scan through the sections in the users guide and the device data sheet on I/O ports. Explain what port control registers we need to set for the LED1 to blink.
The Programming Assignment
Write a C program using CodeComposer Studio that will toggle the red LED on the development board. The period of the LED blinking will be set using the Timer A module. Experiment with different values for the LED period.
Note: Organize your report with clear headings and explanations. Your report should be detailed enough so that someone with no prior knowledge of the MSP430 would be able to reproduce your work. Append your code at the end.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
